Ejemplo n.º 1
0
 //if pool is between CurrentPoint and NextPoint then cycle to nextPoint
 public void CycleToNextIfBehind(WoWGameObject pool)
 {
     WoWPoint cp = CurrentPoint;
     WoWPoint point = GetNextWayPoint();
     point = new WoWPoint(point.X - cp.X, point.Y - cp.Y, 0);
     point.Normalize();
     float angle = WoWMathHelper.NormalizeRadian((float)Math.Atan2(point.Y, point.X - 1));
     if (WoWMathHelper.IsFacing(CurrentPoint, angle, pool.Location)
         && CurrentPoint != WayPoints[WayPoints.Count - 1])
     {
         CycleToNextPoint();
     }
 }
Ejemplo n.º 2
0
        //if pool is between CurrentPoint and NextPoint then cycle to nextPoint
        public void CycleToNextIfBehind(WoWGameObject pool)
        {
            WoWPoint cp    = CurrentPoint;
            WoWPoint point = GetNextWayPoint();

            point = new WoWPoint(point.X - cp.X, point.Y - cp.Y, 0);
            point.Normalize();
            float angle = WoWMathHelper.NormalizeRadian((float)Math.Atan2(point.Y, point.X - 1));

            if (WoWMathHelper.IsFacing(CurrentPoint, angle, pool.Location) &&
                CurrentPoint != WayPoints[WayPoints.Count - 1])
            {
                CycleToNextPoint();
            }
        }