public void DoDeathLogic() { level = missileSpawner.StopSpawning() / 2; pickupSpawner.StopSpawning(); if (firstDeath) { firstDeath = false; gameUI.SetActive(false); ScoreManager.Instance.SetReviveScore(); reviveUI.SetActive(true); } else { Invoke("FinishClearingScene", 2.0f); } }
private void StopGame() { if (!firstRun) { playerController.Speed = 0f; PlanetSpawner.SetPlayingMode(false); } isPlaying = false; topScore = Mathf.Max(topScore, score); playerController.SetPlayingMode(false); DestroyMissiles(); DestroyIncentives(); DestroyShip(); StopCoroutine("SpawnMissiles"); MissileSpawner.StopSpawning(); StopCoroutine("SpawnIncentives"); StartCoroutine("ActivateInterface"); AdManager.ShowInterstitial(); }