Beispiel #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("d2"))
     {
         life.dealDmg(1);
     }
     if (other.gameObject.CompareTag("oob"))
     {
         uiC.Oob();
     }
     if (other.gameObject.CompareTag("Finish"))
     {
         uiC.win = true;
         life.Dead();
     }
 }
Beispiel #2
0
 void OnCollisionEnter(Collision col)
 {
     if (col.gameObject.CompareTag("Player"))
     {
         if (t == 0)
         {
             life.dealDmg(1);
             t = hitTime;
         }
     }
 }
Beispiel #3
0
 void OnCollisionEnter(Collision other)
 {
     if (!other.gameObject.CompareTag("Player"))
     {
         move = move * -1;
     }
     if (other.gameObject.CompareTag("Player"))
     {
         if (t == 0)
         {
             life.dealDmg(dmgDealt);
             t = hitTimer;
         }
     }
 }