Пример #1
0
 public static bool missleWillHit(MissileClient missle)
 {
     if (missle.Target.IsMe || YasMath.interCir(missle.StartPosition.LSTo2D(), missle.EndPosition.LSTo2D(), Player.Position.LSTo2D(), missle.SData.LineWidth + Player.BoundingRadius))
     {
         if (missle.StartPosition.LSDistance(Player.Position) < (missle.StartPosition.LSDistance(missle.EndPosition)))
         {
             return(true);
         }
     }
     return(false);
 }
Пример #2
0
        public static List <Obj_AI_Base> canGoThrough(YasDash dash)
        {
            List <Obj_AI_Base> jumps     = ObjectManager.Get <Obj_AI_Base>().Where(enemy => enemyIsJumpable(enemy) && enemy.LSIsValidTarget(550, true, dash.to)).ToList();
            List <Obj_AI_Base> canBejump = new List <Obj_AI_Base>();

            foreach (var jumpe in jumps)
            {
                if (YasMath.interCir(dash.from.LSTo2D(), dash.to.LSTo2D(), jumpe.Position.LSTo2D(), 35) /*&& jumpe.LSDistance(dash.to) < Player.LSDistance(dash.to)*/)
                {
                    canBejump.Add(jumpe);
                }
            }
            return(canBejump.OrderBy(jum => Player.LSDistance(jum)).ToList());
        }