当前位置: 首页>>代码示例>>C#>>正文


C# Geometry.Polygon.Circle.ToClipperPath方法代码示例

本文整理汇总了C#中LeagueSharp.Common.Geometry.Polygon.Circle.ToClipperPath方法的典型用法代码示例。如果您正苦于以下问题:C# Geometry.Polygon.Circle.ToClipperPath方法的具体用法?C# Geometry.Polygon.Circle.ToClipperPath怎么用?C# Geometry.Polygon.Circle.ToClipperPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LeagueSharp.Common.Geometry.Polygon.Circle的用法示例。


在下文中一共展示了Geometry.Polygon.Circle.ToClipperPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WPPolygon

 private static Paths WPPolygon(Obj_AI_Hero Hero)
 {
     List<Vector2Time> HeroPath = Hero.GetWaypointsWithTime();
     Vector2 myPath;
     Paths WPPaths = new Paths();
     for (var i = 0; i < HeroPath.Count() - 1; i++)
     {
         if (HeroPath.ElementAt<Vector2Time>(i + 1).Time <= 0.6f)
         {
             Geometry.Polygon.Rectangle WPRectangle = new Geometry.Polygon.Rectangle(HeroPath.ElementAt<Vector2Time>(i).Position, HeroPath.ElementAt<Vector2Time>(i + 1).Position, Hero.BoundingRadius);
             Geometry.Polygon.Circle Box = new Geometry.Polygon.Circle(HeroPath.ElementAt<Vector2Time>(i).Position, Hero.BoundingRadius);
             WPPaths.Add(Box.ToClipperPath());
             WPPaths.Add(WPRectangle.ToClipperPath());
         }
         else
         {
             myPath = PositionAfter(Hero, 0.6f, Hero.MoveSpeed);
             Geometry.Polygon.Rectangle WPRectangle = new Geometry.Polygon.Rectangle(HeroPath.ElementAt<Vector2Time>(i).Position, myPath, Hero.BoundingRadius);
             Geometry.Polygon.Circle Box = new Geometry.Polygon.Circle(myPath, Hero.BoundingRadius);
             WPPaths.Add(Box.ToClipperPath());
             WPPaths.Add(WPRectangle.ToClipperPath());
             break;
         }
     }
     Geometry.Polygon.Circle WPFirstBox = new Geometry.Polygon.Circle(HeroPath.First<Vector2Time>().Position, Hero.BoundingRadius);
     WPPaths.Add(WPFirstBox.ToClipperPath());
     return WPPaths;
 }
开发者ID:BaFuSs,项目名称:test,代码行数:28,代码来源:Program.cs

示例2: InterceptionQ

        private static void InterceptionQ(Obj_AI_Hero Enemy)
        {
            Geometry.Polygon.Circle Qspellpoly = new Geometry.Polygon.Circle(PreCastPos(Enemy, 0.6f), 130f);

            Paths subjs = new Paths();
            foreach (var bla in WPPolygon(Enemy).ToPolygons())
            {
                subjs.Add(bla.ToClipperPath());
            }

            Paths clips = new Paths(1);
            clips.Add(Qspellpoly.ToClipperPath());

            Paths solution = new Paths();
            Clipper c = new Clipper();
            c.AddPaths(subjs, PolyType.ptSubject, true);
            c.AddPaths(clips, PolyType.ptClip, true);
            c.Execute(ClipType.ctIntersection, solution);

            foreach (var bli in solution.ToPolygons())
            {
                bli.Draw(System.Drawing.Color.Blue);
            }
        }
开发者ID:BaFuSs,项目名称:test,代码行数:24,代码来源:Program.cs

示例3: Interceptiontest

        public static void Interceptiontest(Obj_AI_Hero Enemy, float delay, float Range, float varRange)
        {
            Geometry.Polygon.Circle Qspellpoly = new Geometry.Polygon.Circle(LastQCastpos, Q.Width);
            Qspellpoly.Draw(System.Drawing.Color.Khaki);

            Paths subjs = new Paths();
            foreach (var Waypoint in WPPolygon(Enemy, delay).ToPolygons())
            {
                subjs.Add(Waypoint.ToClipperPath());
            }

            Paths clips = new Paths(1);
            clips.Add(Qspellpoly.ToClipperPath());

            Paths solution = new Paths();
            Clipper c = new Clipper();
            c.AddPaths(subjs, PolyType.ptSubject, true);
            c.AddPaths(clips, PolyType.ptClip, true);
            c.Execute(ClipType.ctIntersection, solution);

            foreach (var bli in solution.ToPolygons())
            {
                bli.Draw(System.Drawing.Color.Blue);
            }
        }
开发者ID:blm95,项目名称:LeagueSharp-2,代码行数:25,代码来源:Main.cs


注:本文中的LeagueSharp.Common.Geometry.Polygon.Circle.ToClipperPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。