Fix: Health Manager

Fixed an issue with health manager not responding properly to zero potions
This commit is contained in:
2025-09-04 01:54:39 +02:00
parent 63fede11cb
commit 3b07854bd1
3 changed files with 8 additions and 12 deletions

View File

@@ -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)
{