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


C# Vector3.LSExtend方法代码示例

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


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

示例1: IsOverWall

 public static bool IsOverWall(Vector3 start, Vector3 end)
 {
     double distance = Vector3.Distance(start, end);
     for (uint i = 0; i < distance; i += 10)
     {
         var tempPosition = start.LSExtend(end, i).LSTo2D();
         if (tempPosition.LSIsWall())
         {
             return true;
         }
     }
     return false;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:13,代码来源:Geometry.cs

示例2: GetFirstWallPoint

        public static Vector3 GetFirstWallPoint(Vector3 start, Vector3 end)
        {
            double distance = Vector3.Distance(start, end);
            for (uint i = 0; i < distance; i += 10)
            {
                var tempPosition = start.LSExtend(end, i);
                if (tempPosition.LSIsWall())
                {
                    return tempPosition.LSExtend(start, -35);
                }
            }

            return Vector3.Zero;
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:14,代码来源:WallJumpModule.cs

示例3: CollidesWithWall

        /// <summary>
        ///     Collideses the with wall.
        /// </summary>
        /// <param name="start">The start.</param>
        /// <param name="end">The end.</param>
        /// <returns></returns>
        internal static bool CollidesWithWall(Vector3 start, Vector3 end)
        {
            if (Environment.TickCount - _wallCastT > 4000)
            {
                return false;
            }

            GameObject wall = null;
            foreach (var gameObject in
                ObjectManager.Get<GameObject>()
                    .Where(
                        gameObject =>
                            gameObject.IsValid &&
                            Regex.IsMatch(
                                gameObject.Name, "_w_windwall_enemy_0.\\.troy", RegexOptions.IgnoreCase))
                )
            {
                wall = gameObject;
            }
            if (wall == null)
            {
                return false;
            }
            var level = wall.Name.Substring(wall.Name.Length - 6, 1);
            var wallWidth = 300 + 50*Convert.ToInt32(level);

            var wallDirection =
                (wall.Position.LSTo2D() - _yasuoWallCastedPos).Normalized().Perpendicular();
            var wallStart = wall.Position.LSTo2D() + wallWidth/2f*wallDirection;
            var wallEnd = wallStart - wallWidth*wallDirection;

            for (var i = 0; i < start.LSDistance(end); i += 30)
            {
                var currentPosition = start.LSExtend(end, i);
                if (wallStart.Intersection(wallEnd, currentPosition.LSTo2D(), start.LSTo2D()).Intersects)
                {
                    return true;
                }
            }

            return false;
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:48,代码来源:YasuoWall.cs

示例4: GetWallLength

        public static float GetWallLength(Vector3 start, Vector3 end)
        {
            double distance = Vector3.Distance(start, end);
            var firstPosition = Vector3.Zero;
            var lastPosition = Vector3.Zero;

            for (uint i = 0; i < distance; i += 10)
            {
                var tempPosition = start.LSExtend(end, i);
                if (tempPosition.LSIsWall() && firstPosition == Vector3.Zero)
                {
                    firstPosition = tempPosition;
                }

                lastPosition = tempPosition;
                if (!lastPosition.LSIsWall() && firstPosition != Vector3.Zero)
                {
                    break;
                }
            }

            return Vector3.Distance(firstPosition, lastPosition);
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:23,代码来源:WallJumpModule.cs

示例5: JumpUnderTurret

        private static void JumpUnderTurret(float extrarange, Vector3 objectPosition)
        {
            float mindistance = 100000;
            //Getting next Turret
            Obj_AI_Turret turretToJump = null;

            foreach (int NetID in AllAllyTurret)
            {
                Obj_AI_Turret turret = ObjectManager.GetUnitByNetworkId<Obj_AI_Turret>((uint)NetID);
                if (turret != null && !turret.IsDead)
                {
                    float distance = Player.Position.LSDistance(turret.Position);
                    if (mindistance >= distance)
                    {
                        mindistance = distance;
                        turretToJump = turret;
                    }

                }
            }
            if (turretToJump != null && !TurretHasAggro[turretToJump.NetworkId] && Player.Position.LSDistance(turretToJump.Position) < 1500)
            {
                int i = 0;

                do
                {
                    Vector3 extPos = Player.Position.LSExtend(turretToJump.Position, 685 - i);
                    float dist = objectPosition.LSDistance(extPos + extrarange);
                    Vector3 predictedPosition = objectPosition.LSExtend(extPos, dist);
                    if (predictedPosition.LSDistance(turretToJump.Position) <= 890 && !predictedPosition.LSIsWall())
                    {
                        WardJump(Player.Position.LSExtend(turretToJump.Position, 650 - i), false);
                        JumpPosition = Player.Position.LSExtend(turretToJump.Position, 650 - i);
                        ShallJumpNow = true;
                        break;
                    }

                    i += 50;
                } while (i <= 300 || !Player.Position.LSExtend(turretToJump.Position, 650 - i).LSIsWall());
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:41,代码来源:Program.cs

示例6: ClosestWall

 public static Vector3 ClosestWall(Vector3 StartPos, Vector3 EndPos)
 {
     var distance = StartPos.LSDistance(EndPos);
     for (int i = 1; i < 8; i++)
     {
         if (StartPos.LSExtend(EndPos, distance + 55 * i).LSIsWall())
         {
             return StartPos.LSExtend(EndPos, distance + 55 * i);
         }
     }
     return EndPos;
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:12,代码来源:Environment.cs

示例7: CheckWalls

 public static bool CheckWalls(Vector3 player, Vector3 enemy)
 {
     var distance = player.LSDistance(enemy);
     for (var i = 1; i < 6; i++)
     {
         if (player.LSExtend(enemy, distance + 55*i).IsWall())
         {
             return true;
         }
     }
     return false;
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:12,代码来源:Environment.cs

示例8: GapByFlashR

 private static void GapByFlashR(AIHeroClient target, Vector3 posBehind)
 {
     if (PortAIO.OrbwalkerManager.CanMove(0))
     {
         lastMoveTime = Variables.TickCount;
         PortAIO.OrbwalkerManager.MoveA(
             posBehind.LSExtend(GetPositionKickTo(target), -(GetDistance(target) + Player.BoundingRadius / 2)));
     }
     lastFlashPos = posBehind;
     lastEndPos = GetPositionAfterKick(target);
     lastInsecTime = lastFlashRTime = Variables.TickCount;
     PortAIO.OrbwalkerManager.ForcedTarget(target);
     Player.Spellbook.CastSpell(Flash, posBehind);
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:14,代码来源:LeeSin.cs

示例9: CastW

        private void CastW(AIHeroClient target, Vector3 from, Vector3 to)
        {
            var positions = new List<Vector3>();

            for (var i = 1; i < 11; i++)
            {
                positions.Add(from.LSExtend(to, 42*i));
            }
            var best =
                positions.OrderByDescending(p => p.LSDistance(target.Position))
                    .FirstOrDefault(
                        p => !p.IsWall() && p.LSDistance(player.Position) < W.Range && p.LSDistance(target.Position) > 350);
            if (best != null && best.IsValid())
            {
                W.Cast(best, getCheckBoxItem(config, "packets"));
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:17,代码来源:Shaco.cs

示例10: IsWallBetween

 public static bool IsWallBetween(Vector3 start, Vector3 end, int step = 3)
 {
     if (start.IsValid() && end.IsValid() && step > 0)
     {
         var distance = start.LSDistance(end);
         for (var i = 0; i < distance; i = i + step)
         {
             if (NavMesh.GetCollisionFlags(start.LSExtend(end, i)) == CollisionFlags.Wall)
             {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:15,代码来源:CommonGeometry.cs

示例11: GapByWardJump

 private static void GapByWardJump(AIHeroClient target, Vector3 posBehind)
 {
     if (!WardManager.Place(posBehind, 1))
     {
         return;
     }
     if (Orbwalker.CanMove)
     {
         lastMoveTime = Variables.TickCount;
         Orbwalker.MoveTo(posBehind.LSExtend(GetPositionKickTo(target), -(DistWard + Player.BoundingRadius / 2)));
     }
     lastEndPos = GetPositionAfterKick(target);
     lastInsecTime = WardManager.LastInsecWardTime = WardManager.LastInsecJumpTme = Variables.TickCount;
     Orbwalker.ForcedTarget = target;
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:15,代码来源:LeeSin.cs


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