Пример #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         lvlman.AddPoints(gemPoints);
         Destroy(this.gameObject);
     }
 }
Пример #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Score")
     {
         GetComponent <AudioSource>().PlayOneShot(MyClip);
         scoreman.AddPoints(ScorerPoints);
     }
 }
Пример #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     Debug.Log("inside trigger");
     if (other.tag == "plate")
     {
         lvlman.AddPoints(foodpoint);
         Destroy(this.gameObject);
     }
 }
Пример #4
0
 void DestructionM()
 {
     Destroy(this.gameObject, 0);
     lvlman.AddPoints(mPoints);
 }