Beispiel #1
0
        protected override void DidActivate(bool firstActivation, ActivationType activationType)
        {
            _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>();

            if (firstActivation && activationType == ActivationType.AddedToHierarchy)
            {
                _serverHubsViewController = BeatSaberUI.CreateViewController <RoomCreationServerHubsListViewController>();
                _serverHubsViewController.selectedServerHub += ServerHubSelected;

                _mainRoomCreationViewController                    = BeatSaberUI.CreateViewController <MainRoomCreationViewController>();
                _mainRoomCreationViewController.CreatedRoom       += CreateRoomPressed;
                _mainRoomCreationViewController.SavePresetPressed += SavePreset;
                _mainRoomCreationViewController.LoadPresetPressed += LoadPresetPressed;

                _presetsListViewController = BeatSaberUI.CreateViewController <PresetsListViewController>();
                _presetsListViewController.didFinishEvent += _presetsListViewController_didFinishEvent;
            }

            showBackButton = true;

            ProvideInitialViewControllers(_serverHubsViewController, null, null);
        }
        protected override void DidActivate(bool firstActivation, ActivationType activationType)
        {
            _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>();

            if (firstActivation && activationType == ActivationType.AddedToHierarchy)
            {
                _serverHubsViewController = BeatSaberUI.CreateViewController <RoomCreationServerHubsListViewController>();
                _serverHubsViewController.selectedServerHub += ServerHubSelected;
                _serverHubsViewController.didFinishEvent    += () => { didFinishEvent?.Invoke(false); };

                _mainRoomCreationViewController                         = BeatSaberUI.CreateViewController <MainRoomCreationViewController>();
                _mainRoomCreationViewController.CreatedRoom            += CreateRoomPressed;
                _mainRoomCreationViewController.SavePresetPressed      += SavePreset;
                _mainRoomCreationViewController.LoadPresetPressed      += LoadPresetPressed;
                _mainRoomCreationViewController.keyboardDidFinishEvent += _mainRoomCreationViewController_keyboardDidFinishEvent;
                _mainRoomCreationViewController.presentKeyboardEvent   += PresentKeyboard;
                _mainRoomCreationViewController.didFinishEvent         += () => { DismissViewController(_mainRoomCreationViewController); SetLeftScreenViewController(null); };

                _presetsListViewController = BeatSaberUI.CreateViewController <PresetsListViewController>();
                _presetsListViewController.didFinishEvent += _presetsListViewController_didFinishEvent;
            }

            ProvideInitialViewControllers(_serverHubsViewController, null, null);
        }