added inventory and stamina system
This commit is contained in:
@@ -187,8 +187,13 @@ public class HumanoidEnemy : MonoBehaviour
|
||||
// Punch animation
|
||||
StartCoroutine(PunchAnimation());
|
||||
|
||||
// TODO: Hook into player health system when you have one
|
||||
// player.GetComponent<PlayerHealth>()?.TakeDamage(attackDamage);
|
||||
// Damage the player via Player.health
|
||||
Player playerHealth = player.GetComponent<Player>();
|
||||
if (playerHealth != null)
|
||||
{
|
||||
playerHealth.health -= attackDamage;
|
||||
Debug.Log($"[Enemy] Player health: {playerHealth.health}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user