修改
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class PlayerMonoBehaviour : MonoBehaviour
|
||||
{
|
||||
public Player Player { get; private set; }
|
||||
|
||||
public PlayerUnityComponent UnityComponent { get; private set; }
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
UnityComponent = GetComponentInParent<PlayerUnityComponent>();
|
||||
Player = UnityComponent.Player;
|
||||
OnAwake();
|
||||
}
|
||||
|
||||
protected virtual void OnAwake()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user