void OnTriggerEnter(Collider other) { if (other.gameObject.name == "Player") { Scoreboard.currentScore += 20; TransitionToNewScene.LoadScene(SceneRandomiser.SelectNextScene()); } }
// Update is called once per frame void Update() { numberOfEmails = emailCount; if (emailCount < 1) { TransitionToNewScene.LoadScene(SceneRandomiser.SelectNextScene()); } }
void Update() { //Checks Whether a pop-up object has been closed by player, relocates it and enables it once more killCount = currentKills; RespawnAds(); if (killCount == killLimit) { killCount = 0; currentKills = 0; TransitionToNewScene.LoadScene(SceneRandomiser.SelectNextScene()); } }
// Update is called once per frame void Update() { timer -= Time.deltaTime; clock.text = FormatedTime(CountdownTimer.timer); //If timer equals 0, triggers scene transition if (CountdownTimer.timer < 0) { CountdownTimer.timer = 0; Scoreboard.currentTries++; SceneRandomiser.AddSceneToClosedList(currentScene.name); TransitionToNewScene.LoadScene(SceneRandomiser.SelectNextScene()); Screen.orientation = ScreenOrientation.LandscapeRight; audioManager.SetActive(true); } }
void Update() { for (int i = 0; i < TouchManager.TouchCount(); ++i) { if (TouchManager.GetTouch(i).phase.Equals(TouchPhase.Began)) { //Construct a ray from the current touch coordinates RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(TouchManager.GetTouch(i).position); if (Physics.Raycast(ray, out hit)) { if (hit.collider.name == "Terminal") { audioManager.SetActive(true); scoreboard.SetActive(true); TransitionToNewScene.LoadScene(SceneRandomiser.SelectNextScene()); } } } } }