mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
17 lines
478 B
C#
17 lines
478 B
C#
|
|
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; }
|
|||
|
|
}
|