private void DecreaseHealthValue(float amount) { Value -= amount; if (Value <= 0 && photonView.isMine) { OnDepletedCallback?.Invoke(); } }
public void AdjustHealth(int adjust) { int temp_Health = HealthPoints; HealthPoints += adjust; if (HealthPoints <= 0) { OnHealthDepleted?.Invoke(); } else if (HealthPoints < temp_Health) { OnWounded?.Invoke(); } }
public void Die() { OnHealthDepleted?.Invoke(); OnHealtRemoved(this); }