public static void Cercle2Command(LoLClient client, float size) { float start = 0; float end = (float)(2 * Math.PI); for (float i = start; i < end; i += 0.5f) { var v = Geo.GetPointOnCircle(client.Hero.Position, i, size); client.Hero.AttentionPing(v, client.Hero.NetId, PingTypeEnum.Ping_OnMyWay); } }
/// <summary> /// Only use for auto attack /// </summary> /// <param name="unit"></param> /// <param name="target"></param> public void MoveToTarget(AttackableUnit target, Action onTargetReach, float distanceToTarget = 0) { this.TargetUnit = target; this.WaypointsIndex = 1; this.DistanceToTarget = distanceToTarget; this.OnTargetReachAction = onTargetReach; Vector2 targetPosition = target.Position; if (distanceToTarget > 0) { targetPosition = Geo.GetPointOnCircle(target.Position, target.GetAngleBetween(Unit), distanceToTarget); } Waypoints = new List <Vector2>() { Unit.Position, targetPosition }; // A* right here End = false; }