예제 #1
0
    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);
        }
    }
예제 #2
0
 public void PlayGameButton()
 {
     singleton.AddKempBucks(-2f);
     singleton.Load("Drive");
 }
 public void BackToMenu()
 {
     singleton.AddKempBucks(1.5f);
     singleton.Load("MainMenu");
 }