mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 07:45:54 +00:00
FSM
This commit is contained in:
parent
51ceb4ee3c
commit
054db28c77
5 changed files with 57 additions and 36 deletions
15
Scripts/Components/FSM/EnemyFSMState.cs
Normal file
15
Scripts/Components/FSM/EnemyFSMState.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM;
|
||||
|
||||
public abstract partial class EnemyFSMState : State
|
||||
{
|
||||
[Export]
|
||||
public EnemyState State { get; private set; }
|
||||
public override int StateId => (int)State;
|
||||
|
||||
protected void ChangeState(EnemyState newState)
|
||||
{
|
||||
_stateMachine.SetState((int)newState);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue