mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 03:35:54 +00:00
FSM
This commit is contained in:
parent
51ceb4ee3c
commit
054db28c77
5 changed files with 57 additions and 36 deletions
|
|
@ -1,9 +1,13 @@
|
|||
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;
|
||||
|
|
@ -11,6 +15,11 @@ public abstract partial class State : Node2D
|
|||
public virtual void Init(ActorStateMachine stateMachine)
|
||||
{
|
||||
_stateMachine = stateMachine;
|
||||
|
||||
foreach (var module in Modules)
|
||||
{
|
||||
//module.Init()
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void EnterState();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue