mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 08:15:55 +00:00
FSM Test
This commit is contained in:
parent
f1f40a91dd
commit
af46098aca
9 changed files with 414 additions and 145 deletions
|
|
@ -5,18 +5,11 @@ namespace Cirno.Scripts.Components.FSM;
|
|||
public abstract partial class PlayerFSMState : State
|
||||
{
|
||||
[Export]
|
||||
public PlayerState State { get; private set; }
|
||||
public PlayerState State { get; private set; }
|
||||
public override int StateId => (int)State;
|
||||
|
||||
|
||||
protected void ChangeState(PlayerState newState)
|
||||
{
|
||||
_stateMachine.SetState((int)newState);
|
||||
}
|
||||
}
|
||||
|
||||
public enum PlayerState
|
||||
{
|
||||
Idle,
|
||||
Walking,
|
||||
Cutscene
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue