Exemple #1
0
 public void Dispose()
 {
     if (StateHandler == null)
     {
         return;
     }
     StateHandler.Dispose();
     StateHandler = null;
 }
Exemple #2
0
        public void ChangeState(int state, object[] extraArgs)
        {
            if (CurrentState == state)
            {
                return;
            }

            CurrentState = state;

            if (StateHandler != null)
            {
                StateHandler.Dispose();
                StateHandler = null;
            }

            StateHandler = StateFactory.Create(state, extraArgs);
            StateHandler.Initialize();
        }