public void OpenBuildMenu() { GameManager.Hud.Infotext.gameObject.SetActive(false); buildmenu.gameObject.SetActive(true); CloseWOButtons(); GameManager.Hud.OpenPanelButton(PanelButtonType.BackButton); BackButton.SetGameObjectsToOpen(new GameObject[] { GameManager.Hud.Infotext.gameObject }); BackButton.SetGameObjectsToClose(new GameObject[] { buildmenu.gameObject, /*GameManager.Hud.Infotext.statsText.gameObject*/ }); }
public void CancelPlacement() { foreach (MainButton mb in GameManager.Hud.mainButtons) { mb.gameObject.SetActive(true); } GameManager.checkButton.GetComponent <Button>().onClick.RemoveAllListeners(); GameManager.cancelButton.GetComponent <Button>().onClick.RemoveAllListeners(); GameManager.checkButton.gameObject.SetActive(false); GameManager.cancelButton.gameObject.SetActive(false); GameManager.HumanPlayer.tempBuilding.gameObject.SetActive(false); GameManager.HumanPlayer.userInput.SelectCapital(); GameManager.Hud.Infotext.gameObject.SetActive(false); gameObject.SetActive(true); CloseWOButtons(); GameManager.Hud.OpenPanelButton(PanelButtonType.BackButton); BackButton.SetGameObjectsToOpen(new GameObject[] { GameManager.Hud.Infotext.gameObject }); BackButton.SetGameObjectsToClose(new GameObject[] { gameObject }); }