void DamagePlayer() { PlayerManager.p_instance.p_health -= 10; PlayerHealthBar.SetHealthBarValue(PlayerHealthBar.GetHealthBarValue() - 0.10f); if (PlayerManager.p_instance.p_health <= 0) { OnPlayerDeath(); } }
void HealPlayer() { PlayerManager.p_instance.p_health += 5; if (PlayerManager.p_instance.p_health >= 100) { PlayerManager.p_instance.p_health = 100; } PlayerHealthBar.SetHealthBarValue(PlayerHealthBar.GetHealthBarValue() + .05f); }