public void BuildingSelected(PlayerBuildingButton playerBuildingButton, bool isEmpty) { if (isEmpty) { int buildingNumber = playerBuildingButtons.FindIndex(c => c == playerBuildingButton); playerBuildingDialog.Activate(system, player, buildingNumber); } }
public static void RemoveGui() { Loader.isGuiRunning = false; if (PBButton != null) { UnityEngine.Object.Destroy(PBButton); Loader.PBButton = null; } }
public static void SetupPlayerBuildingButton() { var playerBuildingInfo = UIView.Find <UIPanel>("(Library) CityServiceWorldInfoPanel"); if (PBMenuPanel == null) { PBMenuPanel = (playerBuildingInfo.AddUIComponent(typeof(PlayerBuildingButton)) as PlayerBuildingButton); } PBMenuPanel.Show(); }
public static void SetupPlayerBuildingButton() { var playerBuildingInfo = UIView.Find <UIPanel>("(Library) CityServiceWorldInfoPanel"); if (PBButton == null) { PBButton = (playerBuildingInfo.AddUIComponent(typeof(PlayerBuildingButton)) as PlayerBuildingButton); } PBButton.width = 40f; PBButton.height = 35f; PBButton.relativePosition = new Vector3(120, playerBuildingInfo.size.y - PBButton.height); PBButton.Show(); }
public static void RemoveGui() { Loader.isGuiRunning = false; if (PBMenuPanel != null) { UnityEngine.Object.Destroy(PBMenuPanel); Loader.PBMenuPanel = null; } if (UBMenuPanel != null) { UnityEngine.Object.Destroy(UBMenuPanel); Loader.UBMenuPanel = null; } if (WBMenuPanel != null) { UnityEngine.Object.Destroy(WBMenuPanel); Loader.WBMenuPanel = null; } }
public static void RemoveGui() { isGuiRunning = false; if (parentGuiView != null) { parentGuiView = null; UnityEngine.Object.Destroy(ecnomicUI); UnityEngine.Object.Destroy(realCityUI); UnityEngine.Object.Destroy(politicsUI); UnityEngine.Object.Destroy(EcButton); UnityEngine.Object.Destroy(RcButton); UnityEngine.Object.Destroy(PlButton); ecnomicUI = null; realCityUI = null; politicsUI = null; EcButton = null; RcButton = null; PlButton = null; } if (BButton != null) { UnityEngine.Object.Destroy(BButton); BButton = null; } if (PBButton != null) { UnityEngine.Object.Destroy(PBButton); PBButton = null; } if (buildingWindowGameObject != null) { UnityEngine.Object.Destroy(buildingWindowGameObject); } //remove HumanUI if (humanUI != null) { if (humanUI.parent != null) { humanUI.parent.eventVisibilityChanged -= HumanInfo_eventVisibilityChanged; } } if (HumanWindowGameObject != null) { UnityEngine.Object.Destroy(HumanWindowGameObject); } //remove TouristUI if (touristUI != null) { if (touristUI.parent != null) { touristUI.parent.eventVisibilityChanged -= TouristInfo_eventVisibilityChanged; } } if (TouristWindowGameObject != null) { UnityEngine.Object.Destroy(TouristWindowGameObject); } if (!isTransportLinesManagerRunning) { if (PBLUI != null) { if (PBLUI.parent != null) { PBLUI.parent.eventVisibilityChanged -= PBLInfo_eventVisibilityChanged; } } if (PBLWindowGameObject != null) { UnityEngine.Object.Destroy(PBLWindowGameObject); } PBLUI._initialized = false; } }