示例#1
0
文件: Program.cs 项目: riwalry1/AIO
        public static Geometry.Polygon GetQPolygon(Vector3 destination)
        {
            var polygon = new Geometry.Polygon();
            for (var i = 10; i < SpellManager.QSkillshotRange; i += 10)
            {
                if (i > SpellManager.QSkillshotRange)
                {
                    break;
                }

                polygon.Add(Player.ServerPosition.LSExtend(destination, i));
            }

            return polygon;
        }
示例#2
0
        public static Geometry.Polygon GetPolyFromVector(Vector3 from, Vector3 to, float width)
        {
            var POS       = to.Extend(from, from.LSDistance(to));
            var direction = (POS - to.To2D()).Normalized();

            var pos1 = (to.To2D() - direction.Perpendicular() * width / 2f).To3D();

            var pos2 =
                (POS + (POS - to.To2D()).Normalized() + direction.Perpendicular() * width / 2f).To3D();

            var pos3 = (to.To2D() + direction.Perpendicular() * width / 2f).To3D();

            var pos4 =
                (POS + (POS - to.To2D()).Normalized() - direction.Perpendicular() * width / 2f).To3D();
            var poly = new Geometry.Polygon();

            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return(poly);
        }
示例#3
0
        private Geometry.Polygon GetPoly(Vector3 pos)
        {
            var POS       = player.ServerPosition.LSExtend(pos, Q.ChargedMaxRange);
            var direction = (POS.LSTo2D() - player.ServerPosition.LSTo2D()).Normalized();

            var pos1 = (player.ServerPosition.LSTo2D() - direction.Perpendicular() * qWidth / 2f).To3D();

            var pos2 =
                (POS.LSTo2D() + (POS.LSTo2D() - player.ServerPosition.LSTo2D()).Normalized() +
                 direction.Perpendicular() * qWidth / 2f).To3D();

            var pos3 = (player.ServerPosition.LSTo2D() + direction.Perpendicular() * qWidth / 2f).To3D();

            var pos4 =
                (POS.LSTo2D() + (POS.LSTo2D() - player.ServerPosition.LSTo2D()).Normalized() -
                 direction.Perpendicular() * qWidth / 2f).To3D();
            var poly = new Geometry.Polygon();

            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return(poly);
        }
示例#4
0
        public static Geometry.Polygon GetPoly(Vector3 pos, float range, float widht)
        {
            var POS       = player.ServerPosition.Extend(pos, range);
            var direction = (POS - player.ServerPosition.To2D()).Normalized();

            var pos1 = (player.ServerPosition.To2D() - direction.Perpendicular() * widht / 2f).To3D();

            var pos2 =
                (POS + (POS - player.ServerPosition.To2D()).Normalized() +
                 direction.Perpendicular() * widht / 2f).To3D();

            var pos3 = (player.ServerPosition.To2D() + direction.Perpendicular() * widht / 2f).To3D();

            var pos4 =
                (POS + (POS - player.ServerPosition.To2D()).Normalized() -
                 direction.Perpendicular() * widht / 2f).To3D();
            var poly = new Geometry.Polygon();

            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return(poly);
        }
示例#5
0
        public static Geometry.Polygon GetPolyFromVector(Vector3 from, Vector3 to, float width)
        {
            var POS = to.Extend(from, from.Distance(to));
            var direction = (POS - to.To2D()).Normalized();

            var pos1 = (to.To2D() - direction.Perpendicular()*width/2f).To3D();

            var pos2 =
                (POS + (POS - to.To2D()).Normalized() + direction.Perpendicular()*width/2f).To3D();

            var pos3 = (to.To2D() + direction.Perpendicular()*width/2f).To3D();

            var pos4 =
                (POS + (POS - to.To2D()).Normalized() - direction.Perpendicular()*width/2f).To3D();
            var poly = new Geometry.Polygon();
            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return poly;
        }
示例#6
0
        public static Geometry.Polygon GetPoly(Vector3 pos, float range, float widht)
        {
            var POS = player.ServerPosition.Extend(pos, range);
            var direction = (POS - player.ServerPosition.To2D()).Normalized();

            var pos1 = (player.ServerPosition.To2D() - direction.Perpendicular()*widht/2f).To3D();

            var pos2 =
                (POS + (POS - player.ServerPosition.To2D()).Normalized() +
                 direction.Perpendicular()*widht/2f).To3D();

            var pos3 = (player.ServerPosition.To2D() + direction.Perpendicular()*widht/2f).To3D();

            var pos4 =
                (POS + (POS - player.ServerPosition.To2D()).Normalized() -
                 direction.Perpendicular()*widht/2f).To3D();
            var poly = new Geometry.Polygon();
            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return poly;
        }
示例#7
0
        public static Geometry.Polygon GetQPolygon(Vector3 destination)
        {
            var polygon = new Geometry.Polygon();
            for (var i = 10; i < SpellManager.QSkillshotRange; i += 10)
            {
                if (i > SpellManager.QSkillshotRange)
                {
                    break;
                }

                polygon.Add(Player.ServerPosition.LSExtend(destination, i));
            }

            return polygon;
        }
示例#8
0
        private Geometry.Polygon GetPoly(Vector3 pos)
        {
            var POS = player.ServerPosition.LSExtend(pos, Q.ChargedMaxRange);
            var direction = (POS.LSTo2D() - player.ServerPosition.LSTo2D()).LSNormalized();

            var pos1 = (player.ServerPosition.LSTo2D() - direction.LSPerpendicular()*qWidth/2f).To3D();

            var pos2 =
                (POS.LSTo2D() + (POS.LSTo2D() - player.ServerPosition.LSTo2D()).LSNormalized() +
                 direction.LSPerpendicular()*qWidth/2f).To3D();

            var pos3 = (player.ServerPosition.LSTo2D() + direction.LSPerpendicular()*qWidth/2f).To3D();

            var pos4 =
                (POS.LSTo2D() + (POS.LSTo2D() - player.ServerPosition.LSTo2D()).LSNormalized() -
                 direction.LSPerpendicular()*qWidth/2f).To3D();
            var poly = new Geometry.Polygon();
            poly.Add(pos1);
            poly.Add(pos3);
            poly.Add(pos2);
            poly.Add(pos4);
            return poly;
        }