CameraBuddy.Spectate.Core.Movement.WalkToTurrent C# (CSharp) Method

WalkToTurrent() public static method

public static WalkToTurrent ( Lane lane, Buildings tier, float distance, bool allyTurrent = true ) : bool
lane Lane
tier CameraBuddy.Spectate.Situation.Buildings
distance float
allyTurrent bool
return bool
        public static bool WalkToTurrent(Lane lane, Buildings.TurrentTier tier, float distance, bool allyTurrent = true)
        {
            if (allyTurrent)
                return Player.IssueOrder(GameObjectOrder.MoveTo,
                    Player.Posistion.Extend(
                        Buildings.Ally.Turrents.First(x => x.Position.IsInLane(lane) && x.GetTurrentTier() == tier)
                            .Position, distance).To3DWorld());
            return Player.IssueOrder(GameObjectOrder.MoveTo,
                Buildings.Enemy.Turrents.First(x => x.Position.IsInLane(lane) && x.GetTurrentTier() == tier)
                    .Position.RandomPoint(10));
        }