using System; using System.Collections.Generic; namespace BITKit.StateMachine { public interface IState { bool Enabled { get; set; } void Initialize(); void OnStateEntry(IState old); void OnStateUpdate(float deltaTime); void OnStateExit(IState old, IState newState); } public interface IStateMachine where T : IState { bool Enabled { get; set; } T CurrentState { get; set; } event Action OnStateChanged; IDictionary StateDictionary { get; } void Initialize(); void UpdateState(float deltaTime); void DisposeState(); void TransitionState() where State : T; void TransitionState(T state); } }