Exemple #1
0
 void OnCollisionEnter2D(Collision2D touch)
 {
     PublicFunctions.DamageEnemy(touch, damage);
 }//Damage the enemy
Exemple #2
0
 void OnCollisionEnter2D(Collision2D hit)
 {
     PublicFunctions.DamageEnemy(hit, damage);
 }//Damage enemy on contact
Exemple #3
0
 void OnCollisionEnter2D(Collision2D punch)
 {
     PublicFunctions.DamageEnemy(punch, damage);
 }//Damage enemy if a punch is hit
Exemple #4
0
    void OnCollisionEnter2D(Collision2D contact)
    {
        PublicFunctions.DamageEnemy(contact, damage);

        Destroy(gameObject);
    }