Esempio n. 1
0
        private void OnTriggerEnter2D(Collider2D other)
        {
            var entityHitBox = GetHitBox(other);

            if (!entityHitBox)
            {
                return;
            }
            if (status.IsVulnerable())
            {
                status.GetDamage(entityHitBox.Attack(transform.parent.gameObject));
            }
            if (!status.IsAlive())
            {
                status.OnDeath();
            }
        }