public override void SetIsOpened(bool value, bool raiseEvent = true) { base.SetIsOpened(value, raiseEvent); m_gameState = Dependencies.GameState; m_gameServer = Dependencies.GameServer; Sequence[SaveReplayAction].interactable = !m_gameState.IsReplay && m_gameServer.IsConnected; Sequence[SaveReplayAction].gameObject.SetActive(!m_gameState.IsReplay); m_saveReplayPanel.SetIsOpened(false, raiseEvent); }
private void Update() { //if (m_gameState.IsContextActionInProgress(LocalPlayerIndex)) //{ // return; //} if (m_gameState.IsPauseStateChanging) { return; } if (m_inputManager.GetButtonDown(InputAction.Back, LocalPlayerIndex, false, false)) { if (m_gameState.IsContextActionInProgress(LocalPlayerIndex)) { m_gameState.IsContextActionInProgress(LocalPlayerIndex, false); return; } if (!m_gameState.IsActionsMenuOpened(LocalPlayerIndex)) { m_gameState.IsMenuOpened(LocalPlayerIndex, !m_gameState.IsMenuOpened(LocalPlayerIndex)); m_menuPanel.SetIsOpened(!m_menuPanel.IsOpened); } } if (m_gameState.IsMenuOpened(LocalPlayerIndex)) { if (m_inputManager.GetButtonDown(InputAction.B, LocalPlayerIndex, true, false)) { if (m_menuPanel.IsOpened) { m_gameState.IsMenuOpened(LocalPlayerIndex, false); } m_menuPanel.SetIsOpened(false); m_consolePanel.SetIsOpened(false); m_settingsPanel.SetIsOpened(false); m_resultsPanel.SetIsOpened(false); } } }