private void OnDisable()
        {
            if (m_notification != null)
            {
                m_notification.Close();
            }
            if (m_connectButton != null)
            {
                m_connectButton.gameObject.SetActive(false);
            }
            if (m_remoteGameServer != null)
            {
                m_remoteGameServer.ConnectionStateChanging -= OnConnectionStateChanging;
                m_remoteGameServer.ConnectionStateChanged  -= OnConnectionStateChanged;
                m_remoteGameServer.LoggedOff -= OnPlayersLoggedOff;
            }

            if (m_root != null)
            {
                m_root.SetActive(false);
            }

            if (m_inputManager != null)
            {
                m_inputManager.IsInInitializationState = false;
                m_inputManager.DeviceEnabled          -= OnDeviceEnabled;
                m_inputManager.DeviceDisabled         -= OnDeviceDisabled;
            }
        }
Beispiel #2
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();
 }
Beispiel #3
0
        private void OnReconnected(Error error, Player[] payload, Guid[] extra1, VoxelAbilitiesArray[] extra2, SerializedTaskArray[] extra3, SerializedTaskTemplatesArray[] extra4, AssignmentGroupArray[] assignmentGroups, Room extra5, MapRoot mapRoot)
        {
            m_notification.Close();
            m_voxelMap.IsOn = false;
            m_voxelMap.Load(mapRoot);
            m_voxelMap.IsOn = true;

            for (int i = 0; i < m_playerControllers.Length; ++i)
            {
                if (assignmentGroups[i].Groups != null)
                {
                    m_playerControllers[i].AssignmentsController.SetGroups(assignmentGroups[i].Groups);
                }
            }
        }
Beispiel #4
0
 private void OnConnectionStateChanging(Error error)
 {
     m_notification.Close();
     UpdateButtonState();
 }