예제 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this);
     }
     if (instance != this)
     {
         Destroy(this.gameObject);
     }
 }
예제 #2
0
        public void LevelCompleted()
        {
            allCompleted = true;
            Timer.PauseTimer();

            string totalTime = TransientController.GetParsedSeconds(Timer.Seconds);

            // Nuevo Record:
            if (Timer.Seconds < Data.recordTimeSeconds)
            {
                Data.recordTimeSeconds = Timer.Seconds;
                totalTime += "\nNuevo Record!";
            }

            TotalTimeText.text = totalTime;
            LevelCanvasAnimator.SetTrigger("level_complete");
        }