Esempio n. 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     send = GameObject.Find("destroyerRight").GetComponent <rightControl>();
     if (other.tag == "purple")
     {
         send.canAzalt(-1);
         send.increasePuan(-10);
     }
     if (other.tag == "green")
     {
         send.canAzalt(-1);
         send.increasePuan(-10);
     }
 }
Esempio n. 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "player")
     {
         send = GameObject.Find("destroyerRight").GetComponent <rightControl>();
         send.increasePuan(-50);
         send.canAzalt(-1);
         Destroy(this.gameObject);
     }
     if (other.tag == "destroyer2")
     {
         Destroy(this.gameObject);
     }
 }