3D Game Kit, Health
Using the Unity 3D game kit as a basis, I want to be able to heal my character without ResetDamage, I want to be able to give back health to the player for colliding with an object.
public void HealPlayer (int amount)
{
{
if (currentHitPoints < maxHitPoints)
{
currentHitPoints += amount;
OnHealPlayer.Invoke();
}
}
}
The collision works, the health object disappears, the int float is placed at 1, the item completely interacts with the player but the healthbar remains the same.
Comment
Your answer
Follow this Question
Related Questions
How to do multiple inheritance (or workaround) with Unity? 1 Answer
Health system in a text based game. 2 Answers
Why does my start function not work? 1 Answer
Slowing down while loops 2 Answers