//-----------------------------------------------------------------------------
 // Constructors
 //-----------------------------------------------------------------------------
 public TransitionFade(Color color, int duration, FadeType type, GameState gameState)
 {
     this.duration	= duration;
     this.timer		= 0;
     this.type		= type;
     this.color		= color;
     this.gameState	= gameState;
 }
Exemple #2
0
 //-----------------------------------------------------------------------------
 // Game state management
 //-----------------------------------------------------------------------------
 // Push a new game-state onto the stack and begin it.
 public void PushGameState(GameState state)
 {
     gameStateStack.Push(state);
 }
        //-----------------------------------------------------------------------------
        // Mutators
        //-----------------------------------------------------------------------------
        public void Push(GameState state)
        {
            if (IsActive) {
                DeleteInactiveStates();
                if (!IsActive)
                    return;
            }

            states.Add(state);

            if (IsActive) {
                state.Begin(gameManager);
                DeleteInactiveStates();
            }
        }
 //-----------------------------------------------------------------------------
 // Mutators
 //-----------------------------------------------------------------------------
 public void Add(GameState state)
 {
     states.Add(state);
 }