コード例 #1
0
        public void Damage(Damager sender, float value)
        {
            if (m_IsGodMode || IsDeath)
            {
                return;
            }

            m_Health -= value;
            if (m_Health > 0)
            {
                OnDamaged?.SafetyInvoke();
                return;
            }

            m_OnDeath?.Invoke(sender, this);
            OnDeath?.Invoke();
            IsDeath = true;
        }