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


C# Vector3.To2D2方法代码示例

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


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

示例1: Line

 public Line(Vector3 start, Vector3 end, float length = -1)
     : this(start.To2D2(), end.To2D2(), length)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例2: Rectangle

 public Rectangle(Vector3 start, Vector3 end, float width)
     : this(start.To2D2(), end.To2D2(), width)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例3: Arc

 public Arc(Vector3 start, Vector3 direction, float angle, float radius, int quality = 20)
     : this(start.To2D2(), direction.To2D2(), angle, radius, quality)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例4: Circle

 public Circle(Vector3 center, float radius, int quality = 20)
     : this(center.To2D2(), radius, quality)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例5: Add

 public void Add(Vector3 point)
 {
     Points.Add(point.To2D2());
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例6: IsInside

 public bool IsInside(Vector3 point)
 {
     return !IsOutside(point.To2D2());
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例7: Distance4

 /// <summary>
 ///     Calculates the 2D distance to the point.
 /// </summary>
 public static float Distance4(this Obj_AI_Base unit, Vector3 point, bool squared = false)
 {
     return unit.ServerPosition.To2D2().Distance7(point.To2D2(), squared);
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:7,代码来源:Geometry.cs

示例8: Distance8

 /// <summary>
 ///     Calculates the distance to the Vector3.
 /// </summary>
 public static float Distance8(this Vector2 v, Vector3 to, bool squared = false)
 {
     return v.Distance7(to.To2D2(), squared);
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:7,代码来源:Geometry.cs

示例9: Sector

 public Sector(Vector3 center, Vector3 direction, float angle, float radius, int quality = 20)
     : this(center.To2D2(), direction.To2D2(), angle, radius, quality)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例10: Ring

 public Ring(Vector3 center, float innerRadius, float outerRadius, int quality = 20)
     : this(center.To2D2(), innerRadius, outerRadius, quality)
 {
 }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:4,代码来源:Geometry.cs

示例11: IsInRange

 /// <summary>
 ///     Returns if the Vector3 is in range of the spell.
 /// </summary>
 public bool IsInRange(Vector3 point, float range = -1)
 {
     return IsInRange(point.To2D2(), range);
 }
开发者ID:lolscripts,项目名称:Aka-s,代码行数:7,代码来源:Spells.cs

示例12: WillHit

        /// <summary>
        ///     Returns if the spell will hit the point when casted on castPosition.
        /// </summary>
        public bool WillHit(Vector3 point, Vector3 castPosition, int extraWidth = 0)
        {
            switch (Type)
            {
                case SkillshotType.SkillshotCircle:
                    if (point.To2D2().Distance8(castPosition, true) < WidthSqr)
                    {
                        return true;
                    }
                    break;

                case SkillshotType.SkillshotLine:
                    if (point.To2D2().Distance(castPosition.To2D2(), From.To2D2(), true, true) <
                        Math.Pow(Width + extraWidth, 2))
                    {
                        return true;
                    }
                    break;
                case SkillshotType.SkillshotCone:
                    var edge1 = (castPosition.To2D2() - From.To2D2()).Rotated2(-Width / 2);
                    var edge2 = edge1.Rotated2(Width);
                    var v = point.To2D2() - From.To2D2();
                    if (point.To2D2().Distance8(From, true) < RangeSqr && edge1.CrossProduct2(v) > 0 &&
                        v.CrossProduct2(edge2) > 0)
                    {
                        return true;
                    }
                    break;
            }

            return false;
        }
开发者ID:lolscripts,项目名称:Aka-s,代码行数:35,代码来源:Spells.cs

示例13: GetMinionsPredictedPositions

        public static List<Vector2> GetMinionsPredictedPositions(List<Obj_AI_Base> minions,
            float delay,
            float width,
            float speed,
            Vector3 from,
            float range,
            bool collision,
            SkillshotType stype,
            Vector3 rangeCheckFrom = new Vector3())
        {
            from = from.To2D2().IsValid() ? from : ObjectManager.Player.ServerPosition;

            return (from minion in minions
                    select
                        Prediction2.GetPrediction(
                            new PredictionInput
                            {
                                Unit = minion,
                                Delay = delay,
                                Radius = width,
                                Speed = speed,
                                From = @from,
                                Range = range,
                                Collision = collision,
                                Type = stype,
                                RangeCheckFrom = rangeCheckFrom
                            })
                into pos
                    where pos.Hitchance >= HitChance.High
                    select pos.UnitPosition.To2D2()).ToList();
        }
开发者ID:lolscripts,项目名称:Aka-s,代码行数:31,代码来源:MinionManager.cs


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