2023-08-22 19:08:45 +08:00
|
|
|
|
using LTGame;
|
|
|
|
|
|
namespace Gameplay.Character
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public class BaseCharacterState : NBaseState
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2023-10-19 15:00:19 +08:00
|
|
|
|
public readonly Character owner;
|
2023-08-22 19:08:45 +08:00
|
|
|
|
|
|
|
|
|
|
public BaseCharacterState(Character character, int id) : base(id)
|
|
|
|
|
|
{
|
|
|
|
|
|
owner = character;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void _OnPreCheck()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Run(float dt)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (isFinished) return;
|
|
|
|
|
|
deltaTime = dt;
|
|
|
|
|
|
passTime += deltaTime;
|
|
|
|
|
|
_OnPreCheck();
|
|
|
|
|
|
if (isFinished) return;
|
|
|
|
|
|
_OnRunning();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void _OnEnter(NBaseState exitState, object param)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void _OnExit(NBaseState exitState, object param)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void _OnRunning()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|