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(); } }
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(); } }
private void EnterCustomization() { //Focus camera on player Camera cam = Camera.main; oldCameraSize = cam.orthographicSize; cam.orthographicSize = 1.5f; ship = PlayerShipScript.player; ship.Dock(); CenterShip(); PopulateAttachmentPoints(); WeaponToggles.gameObject.SetActive(true); customizing = true; }