void Update() { if (Clock >= time && !timeUp) { timeUp = true; audiosrc.Play(); counting = false; blinkTime = 0.33f; blinkEntireDisplay = true; endScreen.ShowScreen(); } if (Input.GetMouseButtonDown(0)) { StartClock(); } if (HasBeenFired) { if (counting) { Clock += Time.deltaTime; } UpdateBoard(); } }
public void EndLevel() { Debug.Log("Level completed!"); // Disables player control. movementation.enabled = false; weaponController.enabled = false; // Displays the end level screen endLevelScreen.ShowScreen(); // Unlocks the mouse. Cursor.visible = true; Cursor.lockState = CursorLockMode.None; // Pauses the game time. Time.timeScale = 0; // The game has ended. isPlaying = false; }