here is the code:
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == “forsenJoy”)
{
Destroy(col.gameObject);
healthAndStamina.Health -= ForsenJoyDamage;
//healthBar.DamageHealthBar(ForsenJoyDamage);
Debug.Log("Collision In: " + gameObject.name);
}
}
the code:
isn’t applied twice on different or same game objects
the function:
isn’t called twice in the script