Make lives work

This commit is contained in:
RochesterX
2025-03-07 10:03:16 -05:00
parent 0e4e6d1b8b
commit 6528d1050f
9 changed files with 108 additions and 35 deletions

View File

@@ -18,7 +18,11 @@ public class RespawnOnTriggerEnter : MonoBehaviour
{
if (other.CompareTag(respawnTag))
{
GetComponent<Damageable>().Respawn();
//GetComponent<Damageable>().Respawn();
if (TryGetComponent(out Damageable damageable))
{
damageable.Damage(9999f);
}
}
}
}