Exemple #1
0
 public void IncreaseHealth(float value)
 {
     health += value;
     if (health > 100.0f)
     {
         health = 100.0f;
     }
     healthHandler.updateSlider();
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     health        = 100.0f;
     initialTime   = Time.time;
     healthHandler = GameObject.FindObjectOfType <HealthHandler>();
     healthHandler.updateSlider();
 }