Untitled
unknown
plain_text
a year ago
370 B
9
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