示例#1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "duvar" || other.tag == "kutu")
     {
         Destroy(this.gameObject);
     }
     if (other.tag == "Player")
     {
         Destroy(this.gameObject);
         playerCan.can -= 20;
         playerCan.canAzalt(1);
         playerCan.canAzalt(1);
     }
 }
示例#2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         playerCan.can -= 35;
         playerCan.canAzalt(1);
     }
 }
示例#3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         karakterCan.can -= 10;
         karakterCan.canAzalt(1);
     }
 }
示例#4
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         karakterCanAzalt.canAzalt(1);
         karakterCanAzalt.can -= 10;
         karakterCanAzalt.ziplat();
     }
     if (other.tag == "mermi")
     {
         Destroy(this.gameObject);
     }
 }
示例#5
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         Destroy(this.gameObject);
         karakterCan.can -= 50;
         for (int i = 0; i < 5; i++)
         {
             karakterCan.canAzalt(1);
             karakterCan.ziplat();
         }
     }
     if (other.tag == "duvar")
     {
         Destroy(this.gameObject);
     }
 }
示例#6
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "duvar")
     {
         Invoke("fonk", Random.Range(2f, 2.1f));
     }
     if (other.tag == "Player")
     {
         for (int i = 0; i <= 2; i++)
         {
             karakter.canAzalt(1);
         }
         karakter.can -= 30;
         karakter.ziplat();
         Invoke("fonk", Random.Range(2f, 2.1f));
     }
 }
示例#7
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "duvar")
     {
         patlama.Play();
         ses.GetComponent <AudioSource>().Play();
         bomba.SetActive(false);
         Invoke("fonk", Random.Range(2f, 2.1f));
     }
     if (other.tag == "Player")
     {
         for (int i = 0; i <= 2; i++)
         {
             karakter.canAzalt(1);
         }
         karakter.can -= 30;
         karakter.ziplat();
         patlama.Play();
         ses.GetComponent <AudioSource>().Play();
         bomba.SetActive(false);
         Invoke("fonk", Random.Range(2f, 2.1f));
     }
 }