//----------------------------------------------------------------------------- // Mutators //----------------------------------------------------------------------------- public void Push(RoomState state) { if (IsActive) { DeleteInactiveStates(); if (!IsActive) { return; } } states.Add(state); if (IsActive) { state.Begin(gameControl); DeleteInactiveStates(); } }
//----------------------------------------------------------------------------- // Mutators //----------------------------------------------------------------------------- public void Add(RoomState state) { states.Add(state); }
// Push a new room-state onto the stack and begin it. public void PushRoomState(RoomState state) { roomStateStack.Push(state); }
//----------------------------------------------------------------------------- // Mutators //----------------------------------------------------------------------------- public void Push(RoomState state) { if (IsActive) { DeleteInactiveStates(); if (!IsActive) return; } states.Add(state); if (IsActive) { state.Begin(gameControl); DeleteInactiveStates(); } }