コード例 #1
0
        public void MoveTo(SmokeLounge.AOtomation.Messaging.GameData.Vector3 destination)
        {
            FollowTargetMessageHandler.Default.Send(this.Character, this.Character.RawCoordinates, destination);
            Vector3 dest  = destination;
            Vector3 start = this.Character.RawCoordinates;

            dest = start - dest;
            dest = dest.Normalize();
            this.Character.Heading = (Quaternion)Quaternion.GenerateRotationFromDirectionVector(dest);
            this.Run();

            Coordinate c = new Coordinate(destination);

            this.followCoordinates = c.coordinate;

            /*bool arrived = false;
             * double lastDistance = double.MaxValue;
             * while (!arrived)
             * {
             *  Coordinate temp = this.Character.Coordinates;
             *  double distance = this.Character.Coordinates.Distance2D(c);
             *  arrived = (distance < 0.2f) || (lastDistance < distance);
             *  lastDistance = distance;
             *  // LogUtil.Debug(DebugInfoDetail.Movement,"Moving...");
             *  Thread.Sleep(100);
             * }
             * LogUtil.Debug(DebugInfoDetail.Movement, "Arrived at "+this.Character.Coordinates.ToString());
             * this.StopMovement();*/
        }
コード例 #2
0
 public override void Coordinates(SmokeLounge.AOtomation.Messaging.GameData.Vector3 position)
 {
     this.RawCoordinates = position;
     LogUtil.Debug(DebugInfoDetail.Movement, "Coord Set at: " + position.ToString());
     this.PredictionTime = DateTime.UtcNow;
 }