Ejemplo n.º 1
0
 public TargetInfo(IElementTarget element, float standoffDistance) {
     Target = element;
     //Destination = element.Position;
     _fstOffset = Vector3.zero;
     CloseEnoughDistance = element.Radius + standoffDistance;
     CloseEnoughDistanceSqrd = CloseEnoughDistance * CloseEnoughDistance;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Plots a course to a Element target and notifies the requester of the 
 /// outcome via the onCoursePlotSuccess or Failure events.
 /// </summary>
 /// <param name="element">The element target.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="standoffDistance">The distance to standoff from the target. This is added to the radius of the target to
 /// determine how close the ship is allowed to approach the target.</param>
 private void PlotCourse(IElementTarget element, Speed speed, float standoffDistance) {
     _targetInfo = new TargetInfo(element, standoffDistance);
     Speed = speed;
     _isFleetMove = false;
     InitializeTargetValues();
     //PlotCourse();
 }