protected void HandleGameStateChanges() { if (gameState == GameState.Menu && uis[currentUInb].IssuedCommand("startGame")) { gameState = GameState.TransitionM; } if (gameState == GameState.Tutorial && uis[currentUInb].IssuedCommand("startGame")) { gameState = GameState.TransitionT; easeIn.Reset(); } else if (gameState == GameState.Menu && uis[currentUInb].IssuedCommand("quit")) { Exit(); } else if (inven.PlayerDead() && gameState == GameState.Game) { gameState = GameState.Dead; currentUInb = 3; player.isDestroyed = true; score = inven.GetScore(); } else if (gameState == GameState.Game && ipp.JustPressed("p")) { gameState = GameState.Pause; currentUInb = 2; } else if (gameState == GameState.Pause && ipp.JustPressed("p")) { gameState = GameState.Game; currentUInb = 1; } else if (gameState == GameState.Pause && uis[currentUInb].IssuedCommand("returnToMenu")) { gameState = GameState.TransitionP; SoundManager.PlaySong("menusong"); goingToMenu = true; } else if (gameState == GameState.Pause && uis[currentUInb].IssuedCommand("retry")) { gameState = GameState.TransitionP; goingToMenu = false; ParticleSystem.Flush(); } else if (gameState == GameState.Dead && uis[currentUInb].IssuedCommand("returnToMenu")) { gameState = GameState.TransitionD; SoundManager.PlaySong("menusong"); goingToMenu = true; } else if (gameState == GameState.Dead && uis[currentUInb].IssuedCommand("retry")) { gameState = GameState.TransitionD; goingToMenu = false; ParticleSystem.Flush(); } }
void UpdateTS(float es) { if (ipp.JustPressed("right")) { turretIndex++; if (turretIndex > availableTurrets.Count - 1) { turretIndex = 0; } } if (ipp.JustPressed("left")) { turretIndex--; if (turretIndex < 0) { turretIndex = availableTurrets.Count - 1; } } }