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

@@ -21,18 +21,6 @@ public class HealthManager : MonoBehaviour
if (_healthText != null)
_healthText.text = _currentHealth.ToString() + "/" + _maxHealth.ToString();
// These are only for debugging!!!!
if(Input.GetKeyDown(KeyCode.K))
if(transform.tag == "Player")
ModifyHealth(-10);
if(Input.GetKeyDown(KeyCode.L))
ModifyHealth(10);
if (Input.GetKeyDown(KeyCode.M))
if(transform.tag == "Enemy")
ModifyHealth(-50);
}
public void ModifyHealth(float amount)