void OnTriggerEnter2D(Collider2D hit) { ennemi ennemi = hit.GetComponent <ennemi>(); if (ennemi != null) { ennemi.TakeDamage(damage); } }
void OnTriggerEnter2D(Collider2D hit) { ennemi ennemi = hit.GetComponent <ennemi>(); if (ennemi != null) { ennemi.TakeDamage(damage); } rb.velocity = Vector2.zero; rendu.enabled = false; cercle.enabled = false; boom.Play(); }