mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
32 lines
No EOL
721 B
C#
32 lines
No EOL
721 B
C#
using Godot;
|
|
using Godot.Collections;
|
|
|
|
namespace Cirno.Scripts.Components.FSM;
|
|
|
|
public abstract partial class State : Node2D
|
|
{
|
|
[Export]
|
|
public Array<FSMStateModule> Modules { get; private set; } = new();
|
|
|
|
public virtual int StateId { get; }
|
|
|
|
protected ActorStateMachine _stateMachine;
|
|
|
|
public virtual void Init(ActorStateMachine stateMachine)
|
|
{
|
|
_stateMachine = stateMachine;
|
|
|
|
foreach (var module in Modules)
|
|
{
|
|
//module.Init()
|
|
}
|
|
}
|
|
|
|
public abstract void EnterState();
|
|
|
|
public abstract void ExitState();
|
|
|
|
public abstract void ProcessState(double delta);
|
|
public abstract void PhysicsProcessState(double delta);
|
|
|
|
} |