Exemplo n.º 1
0
 private void OnResultsPanelAction(ButtonsPanel sender, int code)
 {
     if (code == 0)
     {
         m_resultsPanel.SetIsOpened(false);
     }
 }
        private void OnSaveReplayAction(ButtonsPanel sender, int code)
        {
            m_saveReplayPanel.SetIsOpened(false);
            gameObject.SetActive(true);

            IndependentSelectable.Select(m_sequence[0]);
        }
Exemplo n.º 3
0
 private void OnMenuPanelIsOpenedChanged(ButtonsPanel sender)
 {
     m_notification.Close();
     m_resultsPanel.SetIsOpened(false, false);
     m_settingsPanel.SetIsOpened(false, false);
     m_consolePanel.SetIsOpened(false, false);
     UpdateIsOpenedState();
 }
Exemplo n.º 4
0
        private void OnSettingsIsOpenedChanged(ButtonsPanel sender)
        {
            if (sender.IsOpened)
            {
                m_resultsPanel.SetIsOpened(false, false);
                m_menuPanel.SetIsOpened(false, false);
                m_consolePanel.SetIsOpened(false, false);
            }
            else
            {
                m_menuPanel.SetIsOpened(true);
            }

            UpdateIsOpenedState();
        }
Exemplo n.º 5
0
 private void OnSettingsPanelAction(ButtonsPanel sender, int code)
 {
     m_settingsPanel.SetIsOpened(false);
 }
Exemplo n.º 6
0
 private void OnConsoleAction(ButtonsPanel sender, int code)
 {
     m_consolePanel.SetIsOpened(false);
 }
Exemplo n.º 7
0
        private void OnMenuPanelAction(ButtonsPanel sender, int code)
        {
            switch (code)
            {
            case 0:     //console
                m_menuPanel.SetIsOpened(false);
                m_consolePanel.SetIsOpened(true);

                break;

            case 1:     //close menu
                m_menuPanel.SetIsOpened(false);


                break;

            case 2:     //pause
                m_gameState.IsPaused = !m_gameState.IsPaused;


                break;

            case 3:     //help
                m_menuPanel.SetIsOpened(false);
                m_settingsPanel.SetIsOpened(true);

                break;

            case 4:     //back to menu
                if (m_gameServer.IsConnected)
                {
                    m_gameServer.LeaveRoom(m_gSettings.ClientId, error =>
                    {
                        if (m_gameServer.HasError(error))
                        {
                            m_notification.ShowErrorWithAction(error, () =>
                            {
                                m_navigation.Navigate("Menu", "MainMenu", null);
                            });
                        }
                        else
                        {
                            m_navigation.Navigate("Menu", "MainMenu", null);
                        }
                    });
                }
                else
                {
                    m_navigation.Navigate("Menu", "LoginMenu4Players", null);
                }
                break;

            case 5:     //quit
                m_console.GetChild(LocalPlayerIndex).Write("quit");
                break;

            case 6:     //map editor
                m_console.GetChild(LocalPlayerIndex).Write("mapeditor");
                break;
            }
        }