예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         helpMenu = !helpMenu;
     }
     updateDistance();
     timeLeft   = gm.getTime();
     gameScore  = gm.getScore();
     difficulty = gm.getDifficulity();
     victory    = bc.getWin();
     loss       = gm.getTime() == 0;
 }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        bumpCollision bc  = (bumpCollision)camera.GetComponent(typeof(bumpCollision));
        bool          won = bc.getWin();

        //print (won);
        //print ("bgaudioscript" + won);
        if (won == true)
        {
            //print ("win audio");
            AudioSource audio = GetComponent <AudioSource> ();
            audio.Stop();
        }
    }