Beispiel #1
0
 public int CheckHit(CollisionEvent collisionEvent)
 {
     if (collisionEvent.Origin == null || collisionEvent.Target == null)
     {
         return(CollisionResult.Hit);
     }
     //float hitRoll = Game.DiceRoll() + collisionEvent.ToHit;
     //var result = hitRoll - defendRoll;
     //RpgSystem.DistanceMulti(collisionEvent.OriginEvent.OriginP3, collisionEvent.PositionP3
     return(ToHitCalculation.Calculate(collisionEvent.Origin, collisionEvent.Target));
 }
Beispiel #2
0
        public void Start(Entity entity)
        {
            var target = Owner.Target?.Target;

            if (target == null)
            {
                Owner.DefaultPostAdvance(this);
                return;
            }
            Owner.CurrentData = ToHitCalculation.Calculate(entity, target);
            Owner.DefaultPostAdvance(this);
        }