//Setup Timer game mode public void SetupTimerMode() { TimerMode mode = gameObject.AddComponent <TimerMode>(); mode.timerUI = timerUI; mode.SetupMode(gameTimer); mode.SetupDifficult(dificulty); FindObjectOfType <LapDetector>().totalLaps = 1; timerItems.gameObject.SetActive(true); timerUI.gameObject.SetActive(true); }
//Setup Item mode public void SetupItemMode() { TimerMode mode = gameObject.AddComponent <TimerMode>(); mode.timerUI = timerUI; mode.SetupMode(gameItemsTimer); FindObjectOfType <LapDetector>().totalLaps = 1; timerUI.gameObject.SetActive(true); boostItems.gameObject.SetActive(true); loseControlItems.gameObject.SetActive(true); jumpItems.gameObject.SetActive(true); }