示例#1
0
 void OnMouseDown()
 {
     //GameObject.Find("AudioBulk").GetComponent <AudioSource>().Play();
     ScoreChange.ScoreUP();
     Destroy(gameObject);
     //GetComponent <AudioSource> ().Play ();
 }
示例#2
0
 void Update()
 {
     if (transform.position.y < -6f)
     {
         LifeChange.LifeDec();
         Destroy(gameObject);
     }
     if (fallSpeed <= 0.1)
     {
         fallSpeed = 0.1f;
     }
     transform.position -= new Vector3(0, fallSpeed * Time.deltaTime, 0);
     if (Input.GetKey("escape"))
     {
         SceneManager.LoadScene("main");
         //Lose
     }
     if (bomb)
     {
         ScoreChange.ScoreUP();
         Destroy(gameObject);
     }
 }