Fix: Health Manager
Fixed an issue with health manager not responding properly to zero potions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user