예제 #1
0
 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);
     }
 }
예제 #2
0
    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();
    }