예제 #1
0
    private void Lose()
    {
        SceneManager.LoadScene("GameOver");

        //Hack Lives
        Lives = 3;
        LevelNumberManager.GoToFirstLevel();
    }
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
    private void Awake()
    {
        if (_instance != null)
        {
            Destroy(this);
            return;
        }

        _instance = this;

        DontDestroyOnLoad(gameObject);

        LevelNumberManager.GoToFirstLevel();
    }
예제 #4
0
    private IEnumerator ExplodeMap()
    {
        float stopTime = Time.timeSinceLevelLoad + 2.5f;

        while (Time.timeSinceLevelLoad < stopTime)
        {
            ExplosionManager.SpawnExplosion(_cells[Random.Range(0, CellColCount), Random.Range(0, CellRowCount)].Coordinates);

            yield return(new WaitForSeconds(0.1f));
        }

        LevelNumberManager.GoToNextLevel();

        SceneManager.LoadScene("Main");
    }