Пример #1
0
        private void ProcessPureMissEvent(IActor actor, IActor targetActor, int successToHitRoll, int factToHitRoll)
        {
            if (ActorInteractionBus == null)
            {
                return;
            }

            var damageEvent = new PureMissActorInteractionEvent(actor, targetActor)
            {
                SuccessToHitRoll = successToHitRoll,
                FactToHitRoll    = factToHitRoll
            };

            ActorInteractionBus.PushEvent(damageEvent);
        }
Пример #2
0
        private void ProcessSuccessfulAttackEvent(
            IActor actor,
            IActor targetActor,
            DamageEfficientCalc damageEfficientCalcResult,
            int successToHitRoll,
            int factToHitRoll)
        {
            if (ActorInteractionBus == null)
            {
                return;
            }

            var damageEvent = new DamageActorInteractionEvent(actor, targetActor, damageEfficientCalcResult)
            {
                SuccessToHitRoll = successToHitRoll,
                FactToHitRoll    = factToHitRoll
            };

            ActorInteractionBus.PushEvent(damageEvent);
        }
Пример #3
0
        private void ProcessAttackDodgeEvent(
            IActor actor,
            IActor targetActor,
            PersonDefenceItem personDefenceItem,
            int successToHitRoll,
            int factToHitRoll)
        {
            if (ActorInteractionBus == null)
            {
                return;
            }

            var interactEvent = new DodgeActorInteractionEvent(actor, targetActor, personDefenceItem)
            {
                SuccessToHitRoll = successToHitRoll,
                FactToHitRoll    = factToHitRoll
            };

            ActorInteractionBus.PushEvent(interactEvent);
        }