static public IState <dynamic> GetStateByIndex(StatesIndex index)
 {
     return(StatesRegister._state[index]);
 }
 public StateMachine(T target, StatesIndex defaultState)
 {
     this._target = target;
     this._states = new Dictionary <StatesIndex, IState <T> >();
 }