Пример #1
0
 private void OnCollisionEnter(Collision other)
 {
     if (other.gameObject.tag == "ball")
     {
         gc.addScore();
         ball.Play();
         Destroy(other.gameObject);
         titleControler.tC.GetComponent <AudioSource>().PlayOneShot(catchBall);
         // ball.enableEmission = false;
     }
     if (other.gameObject.tag == "gloden")
     {
         gc.addGolden();
         golden.Play();
         Destroy(other.gameObject);
         titleControler.tC.GetComponent <AudioSource>().PlayOneShot(catchBall);
         // golden.enableEmission = false;
     }
     if (other.gameObject.tag == "bonus")
     {
         gc.addBall();
         bonus.Play();
         Destroy(other.gameObject);
         titleControler.tC.GetComponent <AudioSource>().PlayOneShot(catchBonus);
         // bonus.enableEmission = false;
     }
     if (other.gameObject.tag == "ground")
     {
         isJump = false;
     }
 }