private void DepartStation() { departed = true; mm.ChangeDir(Orientation.Right); mm.StartMovement(); PostToChatMessage.Send("Escape shuttle has departed. If you have been left behind, kindly turn off all the lights and dispose of yourself via the nearest airlock.", ChatChannel.System); }
void Update() { if (GameManager.Instance.GetRoundTime <= 150f && spawnedIn == false && setCourse == false) // Warp close to station 2.5 mins before round ends { SpawnNearStation(); setCourse = true; } if (spawnedIn && setCourse && Vector2.Distance(transform.position, destination) < 2) //If shuttle arrived { arrivedAtStation = true; GameManager.Instance.shuttleArrived = true; setCourse = false; mm.SetPosition(destination); mm.StopMovement(); mm.RotateTo(Orientation.Right); //Rotate shuttle correctly so doors are facing correctly mm.ChangeDir(Orientation.Left); //Reverse into station evac doors. StartCoroutine(ReverseIntoStation(mm)); } if (GameManager.Instance.GetRoundTime <= 30f && arrivedAtStation == true) // Depart the shuttle { mm.ChangeDir(Orientation.Right); mm.StartMovement(); } }
/// <summary> /// Starts or stops the shuttle. /// </summary> /// <param name="off">Toggle parameter</param> public void TurnOnOff(bool on) { if (on && State != TabState.Off && !matrixMove.rcsModeActive) { MatrixMove.StartMovement(); } else { MatrixMove.StopMovement(); } }
/// <summary> /// Starts or stops the shuttle. /// </summary> /// <param name="off">Toggle parameter</param> public void TurnOnOff(bool on) { if (on && State != TabState.Off) { MatrixMove.StartMovement(); } else { MatrixMove.StopMovement(); } }
IEnumerator TryAutoMove(MatrixMove matrixMove) { while (!matrixMove.Initialized) { yield return(WaitFor.EndOfFrame); } yield return(WaitFor.Seconds(RoundStartDelay)); matrixMove.SetSpeed(SetInitialSpeed); matrixMove.SafetyProtocolsOn = ShuttleSafetyEnabled; matrixMove.RequiresFuel = false; matrixMove.StartMovement(); }