public void GameOver() { Time.timeScale = 0f; GameDisplay.SetActive(false); GameOverDisplay.SetActive(true); GameOverScore.GetComponent <TextMeshProUGUI>().text = "Score: " + Score; Advertisement.Show(); }
// Use this for initialization void Start() { controller = GetComponent <Controller2D>(); render = GetComponent <Renderer>(); gameOverDisplay = GameObject.Find("GameOverDisplay").GetComponent <GameOverDisplay>(); invulnerable = new Color(0.8f, 0.3f, 0.3f, 1f); normal = new Color(1f, 1f, 1f, 1f); health = maxHealth; }
void Start() { this.tui = this.GetComponentInChildren <TimerUI>(); this.ad = this.GetComponentInChildren <ActionDisplay>(); this.lb = this.GetComponentInChildren <LockButton>(); this.dbp = this.GetComponentInChildren <DebugPanel>(); this.gsd = this.GetComponentInChildren <GameStateDisplay>(); this.asg = this.GetComponentInChildren <ActionSelectGroup>(); this.god = this.GetComponentInChildren <GameOverDisplay>(); this.GameOverDisplayHide(); // Hide this till needed. Todo Warning, may depend on script execution order this.lasb = new List <ActionSelectButton>(); this.hsd = this.GetComponentInChildren <HitSunkDisplay>(); }
void Start() { gameOverDisplay = gameOverDisplayGO.GetComponent <GameOverDisplay>(); player = playerGO.GetComponent <PlayerController>(); gloomProjectileController = gloomProjectileControllerGO.GetComponent <GloomProjectileController>(); targetCounterText = targetCounterTextGO.GetComponent <TextMeshProUGUI>(); if (string.Equals(SceneManager.GetActiveScene().name, "Level1Scene")) { Debug.Log("I'M IN SCENE 1!!!"); } // Display number of kills to win level killsNeededToWin = 3; targetCounterText.SetText($"{killsNeededToWin}"); }