Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Imp")
     {
         Imp_Controller imp = collision.gameObject.GetComponent <Imp_Controller>();
         imp.TakeDamage(damage + Player_Controller.forca);
     }
 }
Exemple #2
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Imp")
     {
         Imp_Controller imp = collision.gameObject.GetComponent <Imp_Controller>();
         imp.TakeDamage(damage + Player_Controller.forca);
     }
     if (collision.gameObject.tag == "Jack")
     {
         JackObone jack = collision.gameObject.GetComponent <JackObone>();
         jack.TakeDamage(damage + Player_Controller.forca);
     }
     if (collision.gameObject.tag == "boss")
     {
         chefe_controller chefe = collision.gameObject.GetComponent <chefe_controller>();
         chefe.TakeDamage(damage + Player_Controller.forca);
     }
 }