mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 13:55:54 +00:00
New FSM
This commit is contained in:
parent
b0d5edc84e
commit
5a09b7fcd1
18 changed files with 229 additions and 3 deletions
17
Scripts/Components/FSM/IStateMachine.cs
Normal file
17
Scripts/Components/FSM/IStateMachine.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM;
|
||||
|
||||
public interface IStateMachine<TKey, TType>
|
||||
where TKey : notnull
|
||||
where TType : Node
|
||||
{
|
||||
public Dictionary<TKey, IState<TKey, TType>> States { get; set; }
|
||||
protected TKey CurrentStateIndex { get; set; }
|
||||
public IState<TKey, TType> CurrentState { get; }
|
||||
public TKey InitialState { get; }
|
||||
public void SetState(TKey stateId);
|
||||
|
||||
public TType MainObject { get; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue