Пример #1
0
 public void Decrease(float damage)
 {
     currentLife -= damage;
     if (currentLife <= 0)
     {
         patientController.Die();    //tod an patientController
     }
     Lifebar.fillAmount = currentLife / MaxHealth;
 }
Пример #2
0
 /*
  * IEnumerator HEALING_EnterState() {
  *  yield return new WaitForSeconds(patientTimeOut);
  *  if ((GameStates)currentState == GameStates.HEALING) {
  *      currentPatient.Die();
  *      currentState = GameStates.DEAD;
  *  }
  * }
  */
 void HEALING_Update()
 {
     patientTime -= Time.deltaTime;
     if (patientTime <= 0.0f)
     {
         currentPatient.Die();
         currentState = GameStates.DEAD;
     }
 }