public void Update() { if (world.map != null) { if (GraphicalMap.selectedHex == null || GraphicalMap.selectedHex.outer == null) { hexSelector.SetActive(false); } else { hexSelector.SetActive(true); hexSelector.transform.localScale = new Vector3(GraphicalMap.scale, GraphicalMap.scale, 1); hexSelector.transform.localPosition = GraphicalMap.getLoc(GraphicalMap.selectedHex) + new Vector3(0, 0, -5); } if (state == uiState.WORLD) { GraphicalMap.tick(); //if (GraphicalMap.selectedHex == null) //{ // //uiCity.gameObject.SetActive(false); // uiScrollables.gameObject.SetActive(true); //} //else //{ // uiScrollables.gameObject.SetActive(true); //} } else if (state == uiState.SOCIETY) { //GraphicalSociety.tick(); } } else { hexSelector.SetActive(false); } if (state == uiState.WORLD) { uiLeftPrimary.titleTextDarkener.enabled = GraphicalMap.map.masker.mask != MapMaskManager.maskType.NONE; uiLeftPrimary.bodyTextDarkener.enabled = GraphicalMap.map.masker.mask == MapMaskManager.maskType.LIKING_ME || GraphicalMap.map.masker.mask == MapMaskManager.maskType.LIKING_THEM || GraphicalMap.map.masker.mask == MapMaskManager.maskType.VOTE_EFFECT; if (world.map.masker.mask != MapMaskManager.maskType.NONE) { uiLeftPrimary.maskTitle.text = GraphicalMap.map.masker.getTitleText(); uiLeftPrimary.maskBody.text = GraphicalMap.map.masker.getBodyText(); } else { uiLeftPrimary.maskTitle.text = ""; uiLeftPrimary.maskBody.text = ""; } uiTopLight.gameObject.SetActive(true); //uiLeftPrimary.unlandedViewButton.gameObject.SetActive(false); uiLeftPrimary.neighborViewButton.gameObject.SetActive(false); uiLeftPrimary.hierarchyViewButton.gameObject.SetActive(false); //uiLeftPrimary.dynamicViewButton.gameObject.SetActive(false); endTurnButton.SetActive(true); } else if (state == uiState.SOCIETY) { uiLeftPrimary.maskBody.text = ""; uiLeftPrimary.titleTextDarkener.enabled = true; uiLeftPrimary.bodyTextDarkener.enabled = false; uiTopLight.gameObject.SetActive(false); //uiLeftPrimary.unlandedViewButton.gameObject.SetActive(true); uiLeftPrimary.neighborViewButton.gameObject.SetActive(true); uiLeftPrimary.hierarchyViewButton.gameObject.SetActive(GraphicalSociety.activeSociety != null && GraphicalSociety.activeSociety.getSovereign() != null); //uiLeftPrimary.dynamicViewButton.gameObject.SetActive(true); endTurnButton.SetActive(false); GraphicalSociety.update(); } else { uiLeftPrimary.maskTitle.text = ""; uiLeftPrimary.maskBody.text = ""; uiLeftPrimary.titleTextDarkener.enabled = false; uiLeftPrimary.bodyTextDarkener.enabled = false; uiLeftPrimary.unlandedViewButton.gameObject.SetActive(false); uiLeftPrimary.neighborViewButton.gameObject.SetActive(false); uiLeftPrimary.hierarchyViewButton.gameObject.SetActive(false); } if (state == uiState.MAIN_MENU) { uiMainMenu.continueButton.gameObject.SetActive(World.staticMap != null); } checkBlockerQueue(); }
public void Update() { if (world.map != null) { if (GraphicalMap.selectedHex == null || GraphicalMap.selectedHex.outer == null) { hexSelector.SetActive(false); } else { hexSelector.SetActive(true); hexSelector.transform.localScale = new Vector3(GraphicalMap.scale, GraphicalMap.scale, 1); hexSelector.transform.localPosition = GraphicalMap.getLoc(GraphicalMap.selectedHex) + new Vector3(0, 0, -5); } if (state == uiState.WORLD) { GraphicalMap.tick(); if (GraphicalMap.selectedHex == null) { //uiCity.gameObject.SetActive(false); uiScrollables.gameObject.SetActive(true); } else { uiScrollables.gameObject.SetActive(true); } } else if (state == uiState.SOCIETY) { //GraphicalSociety.tick(); } } else { hexSelector.SetActive(false); } if (state == uiState.WORLD) { uiLeftPrimary.titleTextDarkener.enabled = GraphicalMap.map.masker.mask != MapMaskManager.maskType.NONE; uiLeftPrimary.bodyTextDarkener.enabled = GraphicalMap.map.masker.mask == MapMaskManager.maskType.LIKING_ME || GraphicalMap.map.masker.mask == MapMaskManager.maskType.LIKING_THEM; if (world.map.masker.mask != MapMaskManager.maskType.NONE) { uiLeftPrimary.maskTitle.text = GraphicalMap.map.masker.getTitleText(); uiLeftPrimary.maskBody.text = GraphicalMap.map.masker.getBodyText(); } else { uiLeftPrimary.maskTitle.text = ""; uiLeftPrimary.maskBody.text = ""; } } else { uiLeftPrimary.maskTitle.text = ""; uiLeftPrimary.maskBody.text = ""; uiLeftPrimary.titleTextDarkener.enabled = false; uiLeftPrimary.bodyTextDarkener.enabled = false; } if (state == uiState.MAIN_MENU) { uiMainMenu.continueButton.gameObject.SetActive(World.staticMap != null); uiMainMenu.generateText.gameObject.SetActive(World.staticMap == null); } checkBlockerQueue(); }