首次提交
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class PlayerDriveBase
|
||||
{
|
||||
protected PlayerCharacter Character;
|
||||
protected FPlayer Player;
|
||||
|
||||
public void Start(PlayerCharacter character)
|
||||
{
|
||||
Player = character.gameObject.GetComponent<FPlayer>();
|
||||
Character = character;
|
||||
OnStart();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
OnUpdate();
|
||||
}
|
||||
|
||||
public void LateUpdate()
|
||||
{
|
||||
OnLateUpdate();
|
||||
}
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
OnFixedUpdate();
|
||||
}
|
||||
|
||||
public virtual void OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnStart()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnLateUpdate()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnFixedUpdate()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user