Пример #1
0
        public virtual void ReceiveDamage(float damage)
        {
            if (!dead)
            {
                currentHealth -= damage;
                DamageRecieved?.Invoke();

                if (currentHealth <= 0f)
                {
                    Die();
                }
            }
        }