public void UpdateMenu() { gameObject.SetActive(true); MenuManager.CheckExchangeRegiment(); Name.text = current.name + " (" + current.id + ") "; Info.text = string.Format("distance = {0:N2}\ndist coef = {1:N2}\norder coef = {2:N2}\n", current.DistanceToCapital, current.data.IncomeCoefFromDistance(), current.data.IncomeCoefFromOrder()); Treasury t = current.data.income; Treasury tc = current.data.incomeclear; gold.text = string.Format("{0:N1}\n({1:N1})", t.Gold, tc.Gold); manPower.text = string.Format("{0:N1}\n({1:N1})", t.Manpower, tc.Manpower); wood.text = string.Format("{0:N1}\n({1:N1})", t.Wood, tc.Wood); iron.text = string.Format("{0:N1}\n({1:N1})", t.Iron, tc.Iron); science.text = string.Format("{0:N1}\n({1:N1})", t.Science, tc.Science); wievButtons[0].gameObject.SetActive(current.owner != Player.curPlayer); wievButtons[3].gameObject.SetActive(current.data.portLevel != 0); if (current.owner == Player.curPlayer) { buttonSelector.Hidden(0); } if (current.data.portLevel == 0) { buttonSelector.Hidden(3); } buttonSelector.Update(); recruitMenu.UpdateGarnison(); }
public void PanelShowMode() { bool show = !PanelMover.isOn; if (show) { buttonSelector.Update(); } if (show) { PanelMover.Show(); } else { PanelMover.Hide(); } }
public void Update() { ButtonSelector.Update(); }