private void Select() { MenuListItem selectedItem = currentMenu.CurrentItem(); Debug.Log("Select " + selectedItem.itemText); if (selectedItem is SubMenuListItem) { currentMenu.DisplayMenu(false); currentMenu = (SubMenuListItem)selectedItem; currentMenu.DisplayMenu(true); } else { selectedItem.Select(); } }
private void Back() { SubMenuListItem parentMenu = currentMenu.ParentItem(); if (parentMenu == null) { SetPauseState(false); return; } currentMenu.DisplayMenu(false); currentMenu = parentMenu; currentMenu.DisplayMenu(true); }
public void SetPauseState(bool _paused) { paused = _paused; TimeController.Pause(paused); if (rootMenu == null) { return; } if (paused) { currentMenu = rootMenu; currentMenu.DisplayMenu(true); } else { currentMenu.DisplayMenu(false); } }