Exemple #1
0
 private void DecreaseHealthValue(float amount)
 {
     Value -= amount;
     if (Value <= 0 && photonView.isMine)
     {
         OnDepletedCallback?.Invoke();
     }
 }
Exemple #2
0
    public void AdjustHealth(int adjust)
    {
        int temp_Health = HealthPoints;

        HealthPoints += adjust;

        if (HealthPoints <= 0)
        {
            OnHealthDepleted?.Invoke();
        }
        else if (HealthPoints < temp_Health)
        {
            OnWounded?.Invoke();
        }
    }
Exemple #3
0
        public void Die()
        {
            OnHealthDepleted?.Invoke();

            OnHealtRemoved(this);
        }