public void DisplaySpaceStationUI(bool active) { spaceStationUI.SetActive(active); GameMaster.CurrentGameState = GameState.Station; if (active) { player.Dock(); player.transform.position = spaceStationObject.transform.position; player.GetComponent <Rigidbody2D>().velocity = Vector3.zero; } else { GameMaster.CurrentGameState = GameState.Flying; player.Undock(); } }
private void EndCustomization() { Camera cam = Camera.main; cam.orthographicSize = oldCameraSize; ClearAttachmentPoints(); ship.Undock(); WeaponToggles.gameObject.SetActive(false); customizing = false; }
public void DisplayBountyBoard(bool active) { BountyBoard.GetComponent <BountyBoard> ().DestroyButtons(); BountyBoard.SetActive(active); if (active) { player.Dock(); player.transform.position = spaceStation.transform.position; player.GetComponent <Rigidbody2D>().velocity = Vector3.zero; } else { player.Undock(); } }