protected override void DidActivate(bool firstActivation, ActivationType activationType) { _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>(); _beatmapLevelsModel = Resources.FindObjectsOfTypeAll <BeatmapLevelsModelSO>().FirstOrDefault(); _contentModelSO = Resources.FindObjectsOfTypeAll <AdditionalContentModelSO>().FirstOrDefault(); if (firstActivation && activationType == ActivationType.AddedToHierarchy) { _playerManagementViewController = BeatSaberUI.CreateViewController <PlayerManagementViewController>(); _playerManagementViewController.gameplayModifiersChanged += UpdateLevelOptions; _playerManagementViewController.transferHostButtonPressed += TransferHostConfirmation; var dialogOrig = ReflectionUtil.GetPrivateField <SimpleDialogPromptViewController>(FindObjectOfType <MainFlowCoordinator>(), "_simpleDialogPromptViewController"); _passHostDialog = Instantiate(dialogOrig.gameObject).GetComponent <SimpleDialogPromptViewController>(); _hostLeaveDialog = Instantiate(dialogOrig.gameObject).GetComponent <SimpleDialogPromptViewController>(); _quickSettingsViewController = BeatSaberUI.CreateViewController <QuickSettingsViewController>(); _roomNavigationController = BeatSaberUI.CreateViewController <RoomNavigationController>(); _roomNavigationController.didFinishEvent += () => { LeaveRoom(); }; _searchKeyboard = BeatSaberUI.CreateViewController <CustomKeyboardViewController>(); _searchKeyboard.enterButtonPressed += SearchPressed; _searchKeyboard.backButtonPressed += () => { DismissViewController(_searchKeyboard); }; _searchKeyboard.allowEmptyInput = true; } ProvideInitialViewControllers(_roomNavigationController, _playerManagementViewController, _quickSettingsViewController); }
protected override void DidActivate(bool firstActivation, ActivationType activationType) { _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>(); _standardCharacteristic = _beatmapCharacteristics.First(x => x.characteristicName == "Standard"); if (firstActivation && activationType == ActivationType.AddedToHierarchy) { _lastCharacteristic = _standardCharacteristic; _playerManagementViewController = BeatSaberUI.CreateViewController <PlayerManagementViewController>(); _playerManagementViewController.gameplayModifiersChanged += UpdateLevelOptions; _quickSettingsViewController = BeatSaberUI.CreateViewController <QuickSettingsViewController>(); _roomNavigationController = BeatSaberUI.CreateViewController <RoomNavigationController>(); _roomNavigationController.didFinishEvent += () => { LeaveRoom(); }; _searchKeyboard = BeatSaberUI.CreateViewController <CustomKeyboardViewController>(); _searchKeyboard.enterButtonPressed += SearchPressed; _searchKeyboard.backButtonPressed += () => { DismissViewController(_searchKeyboard); }; _searchKeyboard.allowEmptyInput = true; } ProvideInitialViewControllers(_roomNavigationController, _playerManagementViewController, _quickSettingsViewController); }
protected override void DidActivate(bool firstActivation, ActivationType activationType) { _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>(); _beatmapLevelsModel = Resources.FindObjectsOfTypeAll <BeatmapLevelsModelSO>().FirstOrDefault(); if (firstActivation) { _radioNavController = BeatSaberUI.CreateViewController <RoomNavigationController>(); _radioNavController.didFinishEvent += () => { LeaveChannel(); }; _inGameViewController = BeatSaberUI.CreateViewController <InGameScreenViewController>(); _inGameViewController.playPressedEvent += PlayNow_Pressed; _nextSongScreenViewController = BeatSaberUI.CreateViewController <NextSongScreenViewController>(); _nextSongScreenViewController.skipPressedEvent += SkipSong_Pressed; _resultsScreenViewController = BeatSaberUI.CreateViewController <ResultsScreenViewController>(); } ProvideInitialViewControllers(_radioNavController, null, null); }
protected override void DidActivate(bool firstActivation, ActivationType activationType) { _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>(); _standardCharacteristics = _beatmapCharacteristics.First(x => x.characteristicName == "Standard"); _levelCollection = SongLoader.CustomLevelCollectionSO; if (firstActivation) { _radioNavController = BeatSaberUI.CreateViewController <RoomNavigationController>(); _radioNavController.didFinishEvent += () => { LeaveChannel(); }; _inGameViewController = BeatSaberUI.CreateViewController <InGameScreenViewController>(); _inGameViewController.playPressedEvent += PlayNow_Pressed; _nextSongScreenViewController = BeatSaberUI.CreateViewController <NextSongScreenViewController>(); _nextSongScreenViewController.skipPressedEvent += SkipSong_Pressed; _resultsScreenViewController = BeatSaberUI.CreateViewController <ResultsScreenViewController>(); } ProvideInitialViewControllers(_radioNavController, null, null); }
protected override void DidActivate(bool firstActivation, ActivationType activationType) { _beatmapCharacteristics = Resources.FindObjectsOfTypeAll <BeatmapCharacteristicSO>(); _standardCharacteristic = _beatmapCharacteristics.First(x => x.characteristicName == "Standard"); _levelCollection = SongLoader.CustomLevelCollectionSO; if (firstActivation && activationType == ActivationType.AddedToHierarchy) { _lastCharacteristic = _standardCharacteristic; _roomManagementViewController = BeatSaberUI.CreateViewController <RoomManagementViewController>(); _roomManagementViewController.DestroyRoomPressed += DestroyRoomPressed; _roomNavigationController = BeatSaberUI.CreateViewController <RoomNavigationController>(); _roomNavigationController.didFinishEvent += () => { LeaveRoom(); }; _searchKeyboard = BeatSaberUI.CreateViewController <CustomKeyboardViewController>(); _searchKeyboard.enterButtonPressed += SearchPressed; _searchKeyboard.backButtonPressed += () => { DismissViewController(_searchKeyboard); }; _searchKeyboard.allowEmptyInput = true; } ProvideInitialViewControllers(_roomNavigationController, _roomManagementViewController, null); }