private void Update() { if (time > 0) { time -= 0.1f; } else if (update) { //GAME OVER update = false; car.Stop(); Debug.Log("stop"); guiPanel.localPosition = Vector3.zero; float cash = (float)System.Math.Round(Random.Range(0.01f, 0.99f), 3); money.text = "you earned " + cash + " KempBucks!"; singleton.AddKempBucks(cash); } }
public void PlayGameButton() { singleton.AddKempBucks(-2f); singleton.Load("Drive"); }
public void BackToMenu() { singleton.AddKempBucks(1.5f); singleton.Load("MainMenu"); }