1
This commit is contained in:
@@ -31,7 +31,7 @@ namespace BITKit.StateMachine
|
||||
void OnStateExit(IState old, IState newState);
|
||||
}
|
||||
|
||||
public interface IStateMachine<T>
|
||||
public interface IStateMachine<T> where T:IState
|
||||
{
|
||||
bool Enabled { get; set; }
|
||||
T CurrentState { get; set; }
|
||||
@@ -53,7 +53,7 @@ namespace BITKit.StateMachine
|
||||
|
||||
public static class StateMachineUtils
|
||||
{
|
||||
public static void Register<T>(IStateMachine<T> stateMachine, T newState) where T : IState
|
||||
public static void Register<T>(this IStateMachine<T> stateMachine, T newState) where T : IState
|
||||
{
|
||||
if (stateMachine.StateDictionary.ContainsKey(newState.GetType()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user