Exemplo n.º 1
0
        public void SetWaypoint(string position)
        {
            if (!Autopilot)
            {
                return;
            }
            Vector3 proposedPos = position.Vectorized();

            if (proposedPos == TransformState.HiddenPos)
            {
                return;
            }

            //Ignoring requests to set waypoint outside intended radar window
            if (RadarList.ProjectionMagnitude(proposedPos) > EntryList.Range)
            {
                return;
            }
            //Mind the ship's actual position
            Waypoint.transform.position = (Vector2)proposedPos + Vector2Int.RoundToInt(MatrixMove.ServerState.Position);

            EntryList.UpdateExclusive(Waypoint);

            //		Logger.Log( $"Ordering travel to {Waypoint.transform.position}" );
            MatrixMove.AutopilotTo(Waypoint.transform.position);
        }
Exemplo n.º 2
0
 private void MoveTo(Vector3 pos)
 {
     moving      = true;
     destination = pos;
     mm.SetSpeed(25);
     mm.AutopilotTo(destination);
 }
Exemplo n.º 3
0
 public void ApproachStation()
 {
     mm.SetSpeed(25);
     mm.AutopilotTo(destination);
 }