Fix: Health Manager
Fixed an issue with health manager not responding properly to zero potions
This commit is contained in:
@@ -45,7 +45,12 @@ public class PotionHandler:MonoBehaviour
|
||||
|
||||
public bool UsePotion(PotionType type, int amount = 1)
|
||||
{
|
||||
if(potions[type] == 0)
|
||||
return false;
|
||||
|
||||
|
||||
potions[type] -= amount;
|
||||
Debug.Log($"Amount of potions of type {type} is: {potions[type]}");
|
||||
|
||||
if (type == potionType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user