Skip to content
Snippets Groups Projects
Commit 144ffe1e authored by Alifia Rahmah's avatar Alifia Rahmah
Browse files

fix(pet): fix immortal pet cheat

parent f7105e7b
Branches
Tags
No related merge requests found
......@@ -67,18 +67,20 @@ public class PetHealth : MonoBehaviour
public void TakeDamage(int amount)
{
if (CheatMenu.fullhppet) return;
currentHealth -= amount;
if (!CheatMenu.fullhppet)
{
currentHealth -= amount;
petAudio.Play();
petAudio.Play();
if (currentHealth <= 0 && !isDead)
{
Death();
}
if (currentHealth <= 0 && !isDead)
{
Death();
}
// Update slider value
petHealthSlider.value = currentHealth;
// Update slider value
petHealthSlider.value = currentHealth;
};
}
void Death()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment