Exemplo n.º 1
0
        public void ChangeState(GameplayState newState)
        {
            if (StateLookup == null)
            {
                CreateStateLookup();
            }

            if (currentState != null)
            {
                currentState.End();
            }

            currentGameplayState = newState.ToString();
            currentState         = StateLookup[newState];
            currentState.Begin();
        }
 string ToString()
 {
     return(stateName.ToString());
 }