#nullable enable using System.Collections.Generic; using Godot; namespace Cirno.Scripts.Components.FSM; public interface IStateMachine where TKey : notnull where TType : Node { public Dictionary> States { get; set; } protected TKey CurrentStateIndex { get; set; } public IState CurrentState { get; } public TKey InitialState { get; } public void SetState(TKey stateId); public TKey GetState(); public TType MainObject { get; } // Allow states to query modules by type from the owning actor public T? GetModule() where T : Node; }