Untitled
Anonymous
plain_text
06/29/2024 7:21 AM
496 B
26
Indexable
private void OnCollisionEnter2D(Collision2D collision)
{
Debug.Log("Colliding");
if (collision.gameObject.tag == "Player")
{
Debug.Log("Colling with player");
if (playerHealth == null)
{
playerHealth = collision.gameObject.GetComponent<Health>();
}
playerHealth.TakeDamage(damageLevel);
}
}Editor is loading...
Leave a Comment