コード例 #1
0
        private void HandleOnHit(AttackPackage attack, AttackResult result)
        {
            if (_animator.GetCurrentAnimation().name == GhoulAnimationData.Anim.Death_Ground)
            {
                return;
            }

            _flash.Flash();
            _mover.Knockback(attack._fromDirection * attack._knockback);
            _state._hitPoints -= result._finalDamage;
            _state._endurance -= result._finalFatigue;

            if (_state._hitPoints < 0)
            {
                Dying();
            }

            if (_state._endurance <= 0)
            {
                _state._endurance.Current = 0;
                _animator.SetToggle(attack._staggerAnimation, true);
                _launcher.Interrupt();
            }
        }