Fix: Health Manager
Fixed an issue with health manager not responding properly to zero potions
This commit is contained in:
@@ -14,6 +14,7 @@ public class PlayerSkillHandler: MonoBehaviour
|
||||
private Dictionary<PlayerSkillTree.Skills, float> cooldowns;
|
||||
private Dictionary<PlayerSkillTree.Skills, float> cooldownsActivated;
|
||||
private PlayerSkillTree playerSkillTree;
|
||||
private HealthManager healthManager;
|
||||
|
||||
private CharacterController controller;
|
||||
|
||||
@@ -25,6 +26,7 @@ public class PlayerSkillHandler: MonoBehaviour
|
||||
cooldownsActivated = new Dictionary<PlayerSkillTree.Skills, float>();
|
||||
controller = GetComponent<CharacterController>();
|
||||
playerSkillTree = PlayerSkillTree.Instance;
|
||||
healthManager = GetComponent<HealthManager>();
|
||||
AssignCooldowns();
|
||||
}
|
||||
|
||||
@@ -45,6 +47,7 @@ public class PlayerSkillHandler: MonoBehaviour
|
||||
if (playerSkillTree.TryUsePotion(PotionHandler.PotionType.HealthBig))
|
||||
{
|
||||
Debug.Log("Potion used!");
|
||||
healthManager.ModifyHealth(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user