// Update is called once per frame void Update() { //never use loop, it's already looping if (Input.GetMouseButtonDown(1)) { canvasScript.SetHealthBar(2); } if (endGame != true) { CheckGameOver(); //update health and score // canvasScript.SetHealthBar(getHealth()); // canvasScript.SetScore(getScore()); //check bus and kid when touching screen if (Input.GetMouseButtonDown(0)) { // print("GetBusState "+bus.GetBusState()); if (bus.GetBusState()) { canvasScript.SetScore(100); } } } else { UnityEngine.SceneManagement.SceneManager.LoadScene("telolet.mainmenu"); } }