Frame/Assets/Scripts/Player/PlayerInfo.cs

15 lines
309 B
C#
Raw Normal View History

2024-04-05 18:12:04 +08:00
using Sirenix.OdinInspector;
using UnityEngine;
namespace Game.Player;
class PlayerInfo : MonoBehaviour
{
[SerializeField] [ReadOnly] private Player _player;
public void SetPlayer(Player player)
{
this._player = player;
this.gameObject.name = this._player.playerName;
}
}