//Actions when loading level. private void OnLevelWasLoaded(int level) { FindingTimer.StartGame(); //Restart timer. ClickMistake.StartClicks(); ////Zero mistake clicks. Debug.Log("Load"); }
public void Replay() { //MusicPlayer.instance.PlaySoundEffect(MusicPlayer.instance.menuOk, 1); Application.LoadLevel(Application.loadedLevel); //Reload opened scene. //Restart = 1; FindingTimer.StartGame(); //Restart timer. ClickMistake.StartClicks(); ////Zero mistake clicks. Restart = 1; //Return number of clicks back to defined starting number. //Redo to UI function //Pauseimg.SetActive(false); }
void OnLevelWasLoaded(int level) { //------------------------------------------------------------------------ //Defines required clics/removable objects number (when opening level from LevelSelect scene). if (level == 12 || level == 13) { DifferenceInitialPanel(); } if (level == 12) { currentLevel = 0; Debug.Log("Current level = " + currentLevel); //RightClicks = 2; Spots = 2; //TimerLevel = 2; FindingTimer.timeLeft = 20; Debug.Log("Spots = " + Spots); } if (level == 13) { currentLevel = 1; Debug.Log("Current level = " + currentLevel); //RightClicks = 3; Spots = 3; //TimerLevel = 3; FindingTimer.timeLeft = 30; Debug.Log("Spots = " + Spots); } if (level == 1) { //currentLevel = 2; } else { } //------------------------------------------------------------------------ //TimeAndClicks.StartGame(); //Restart timer and zero clicks. FindingTimer.StartGame(); //Restart timer. ClickMistake.StartClicks(); ////Zero mistake clicks. //Debug.Log("IIIII"); }