Пример #1
0
 public void ReduceHealth(float value)
 {
     this.currentHealth -= value;
     if (this.gameObject.GetComponent <PlayerMovement>())
     {
         MessagingSystem.Instance.QueueMessage(new HealthMessage(currentHealth));
     }
     if (this.currentHealth <= 0)
     {
         dc.HandleDeath();
     }
 }