Пример #1
0
 public TargetInfo(ICmdTarget cmd, Vector3 fstOffset, float standoffDistance) {
     Target = cmd;
     Destination = cmd.Position + fstOffset;
     CloseEnoughDistance = cmd.Radius + standoffDistance;
     CloseEnoughDistanceSqrd = CloseEnoughDistance * CloseEnoughDistance;
 }
Пример #2
0
 /// <summary>
 /// Plots a course to a Command target and notifies the requester of the 
 /// outcome via the onCoursePlotCompleted event.
 /// </summary>
 /// <param name="cmd">The command 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(ICmdTarget cmd, Speed speed, float standoffDistance) {
     _targetInfo = new TargetInfo(cmd, _data.FormationStation.StationOffset, standoffDistance);
     Speed = speed;
     _isFleetMove = true;
     PlotCourse();
 }