using Godot;
namespace ColdMint.scripts.stateMachine;
///
/// StateProcessorTemplate
/// 状态处理器模板
///
public abstract class StateProcessorTemplate : IStateProcessor
{
public virtual void Enter(StateContext context)
{
}
public void Execute(StateContext context)
{
if (context.Owner == null)
{
return;
}
OnExecute(context, context.Owner);
}
///
/// When executed
/// 当执行时
///
///
///
protected abstract void OnExecute(StateContext context, Node owner);
public virtual void Exit(StateContext context)
{
}
public abstract State State { get; }
}