public void SwitchPauseMode() { if (Input.GetButtonDown("Pause")) { if (inPause == false && menuPanels == MenuPanels.GamePlay) { menuPanels = MenuPanels.Pause; Time.timeScale = 0; inPause = true; } else { menuPanels = MenuPanels.GamePlay; Time.timeScale = 1; inPause = false; } } }
public void PanelSwitch(int newMenuPanel) { menuPanels = (MenuPanels)newMenuPanel; PanelSwitchActive(); }
public void StartSavedGame() { menuPanels = MenuPanels.GamePlay; saveLoadGameScr.LoadGame(); }
public void StartNewGame() { menuPanels = MenuPanels.GamePlay; Application.LoadLevel(1); }
public void OpenMainMenu() { menuPanels = MenuPanels.MainMenu; Application.LoadLevel(0); }
private void LoadPanels() { MenuPanels menuPanels = new MenuPanels(); menuPanels.Config_no = PosSettings.Default.Configuration; DataSet panelData = menuPanels.GetMenuPanels(); try { DataTable panelTable = panelData.Tables[0]; foreach (DataRow dr in panelTable.Rows) { string panelClassName = dr["panel_class_name"].ToString(); int panelId = int.Parse(dr["panel_id"].ToString()); string panelName = dr["panel_name"].ToString(); if (panelClassName == "EclipsePos.Apps.Views.LeftMenu.LeftMenuView") { LeftMenuView leftMenu = _container.Resolve <LeftMenuView>(); leftMenu.AddPosKeys(panelId, panelName); _container.RegisterInstance <LeftMenuView>(panelId.ToString(), leftMenu); PosContext.Instance.Guis.Add(leftMenu); } if (panelClassName == "EclipsePos.Apps.Views.BottomMenu.BottomMenuView") { BottomMenuView bottomMenu = _container.Resolve <BottomMenuView>(); bottomMenu.AddPosKeys(panelId, panelName); _container.RegisterInstance <BottomMenuView>(panelId.ToString(), bottomMenu); PosContext.Instance.Guis.Add(bottomMenu); } } } catch (Exception e) { Logger.Error(this.GetType().FullName, e.StackTrace, e); } ItemSearchView itemSearchView = _container.Resolve <ItemSearchView>(); _container.RegisterInstance <ItemSearchView>("995", itemSearchView); PosContext.Instance.Guis.Add(itemSearchView); KeyPadView keyPad = _container.Resolve <KeyPadView>(); _container.RegisterInstance <KeyPadView>("KeyPadView", keyPad); PosContext.Instance.Guis.Add(keyPad); AlphaKeyView alphaKeyView = _container.Resolve <AlphaKeyView>(); _container.RegisterInstance <AlphaKeyView>("AlphaKeyView", alphaKeyView); PosContext.Instance.Guis.Add(alphaKeyView); ItemGroupView itemGroupView = _container.Resolve <ItemGroupView>(); _container.RegisterInstance <ItemGroupView>("994", itemGroupView); //PosContext.Instance.Guis.Add(itemSearchView); }