Ejemplo n.º 1
0
    public void NotifySpawnerDead()
    {
        spawnerDead = true;
        UIManager.Instance.SetMessage("Spawner Destroyed");

        float previousBestTime = saveController.GetBestTime();

        if (gameTime < previousBestTime || previousBestTime == 0f)
        {
            Debug.LogFormat("New best time! was: {0}, now: {1}", previousBestTime, gameTime);
            Data.bestTime = gameTime;
            saveController.UpdateData(Data);
        }
        Time.timeScale = 0.25f;

        Invoke("Restart", 2f);
    }