24 lines
465 B
C#
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()
|
|
{
|
|
}
|
|
}
|
|
} |