Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }