cirnogodot/Scripts/Components/FSM/IStateMachine.cs
2025-06-26 14:03:36 +02:00

18 lines
No EOL
522 B
C#

using System.Collections.Generic;
using Godot;
namespace Cirno.Scripts.Components.FSM;
public interface IStateMachine<TKey, [MustBeVariant] 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 TKey GetState();
public TType MainObject { get; }
}