예제 #1
0
        public void ProcessAction(CollisionEvent collisionEvent, ActionStateEvent stateEvent, Entity owner, Entity target)
        {
            if (collisionEvent.Hit <= 0)
            {
                return;
            }
            var stat = owner.FindStatValue(Stats.Power);

            target.Post(new DamageEvent(stat * _normalizedPercent * CollisionExtensions.GetHitMultiplier(collisionEvent.Hit, owner), owner, target, _damageType, _targetVital));
        }
예제 #2
0
 public void ProcessAction(CollisionEvent collisionEvent, ActionStateEvent stateEvent, Entity owner, Entity target)
 {
     if (collisionEvent.Hit <= 0)
     {
         return;
     }
     if (_actionFx != null)
     {
         _actionFx.TriggerEvent(stateEvent);
     }
     target.AddObserver(this);
     target.Post(new DamageEvent(owner.Stats.GetValue(Stats.Power) * _damagePercent * CollisionExtensions.GetHitMultiplier(collisionEvent.Hit, owner), owner, target, _damageType, _targetVital));
 }