Exemplo n.º 1
0
        public static bool CheckNoCollision(Vector2 targetpos, int targetnetid, float width, float delay, float speed, float range)
        {
            List <Vector2> collisions = new List <Vector2>();

            collisions.Add(targetpos);

            foreach (Obj_AI_Base unit in from unit in Prediction.GetCollision(ObjectManager.Player.ServerPosition.To2D(), collisions, Prediction.SkillshotType.SkillshotLine, width, delay, speed, range)
                     where
                     unit.Type == GameObjectType.obj_AI_Hero &&
                     unit.IsValid &&
                     !unit.IsDead &&
                     unit.IsVisible
                     select unit)
            {
                if (unit.NetworkId != targetnetid)
                {
                    return(false);
                }
            }

            return(true);
        }