public void GameOver() { if (gameState == GameState.Menu) { return; } gameState = GameState.Menu; ClearRemainingNotes(); swarm.DestroyAll(); clock.Off(); meterDisplay.Hide(); musicMat.Hide(); titleDisplay.Show(); instructionDisplay.Show(); foreach (var canvas in scoreDisplays) { var forPlayer = canvas.forPlayer - 1; canvas.SetHits(scores[forPlayer].Hits); canvas.SetMisses(scores[forPlayer].Misses); canvas.SetAccuracy(scores[forPlayer].Accuracy); canvas.Show(); } }
public void StartGame() { SetLevel(1); playerController.Reset(); foreach (var score in scores) { score.Reset(); } foreach (var canvas in scoreDisplays) { canvas.Hide(); } instructionDisplay.Hide(); titleDisplay.Hide(); meterDisplay.Show(); musicMat.Show(); }
// Toggles visibility of all objects other than @requestee to @makeVisible private void HideOtherObjects(InteractableObject requestee, bool makeVisible) { for (int i = 0; i < m_InteractibleObjects.Count; i++) { if (m_InteractibleObjects[i] != requestee) { VisibilityToggle visibilityToggle = (VisibilityToggle)m_InteractibleObjects[i]; if (makeVisible) { visibilityToggle.Show(); } else { visibilityToggle.Hide(); } } } }