private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this); } if (instance != this) { Destroy(this.gameObject); } }
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"); }