Keep Away logic finalized and UI polished up
One animation bug found when player picks up hat (possibly when jumping)
This commit is contained in:
@@ -96,12 +96,17 @@ public class Damageable : MonoBehaviour
|
||||
{
|
||||
if (GameManager.Instance != null)
|
||||
{
|
||||
GetComponent<UseItem>().DropItem();
|
||||
UseItem useItem = GetComponent<UseItem>();
|
||||
if (useItem != null)
|
||||
{
|
||||
useItem.DropItem(); // Ensure the player drops the item before the death animation
|
||||
}
|
||||
animator.SetBool("die", true);
|
||||
dying = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void HandleDeath() // Removes player from dying state after respawn
|
||||
{
|
||||
GameManager.Instance.PlayerDied(this);
|
||||
|
||||
Reference in New Issue
Block a user