Files
Fishing2/Assets/Scripts/Fishing/Mono/PlayerMonoBehaviour.cs
2026-04-29 16:39:15 +08:00

24 lines
465 B
C#

using UnityEngine;
namespace NBF
{
public abstract class PlayerMonoBehaviour : MonoBehaviour
{
public Player Player { get; private set; }
protected void Awake()
{
Player = GetComponent<Player>();
if (Player == null)
{
Player = GetComponentInParent<Player>();
}
OnAwake();
}
protected virtual void OnAwake()
{
}
}
}