// ------------------------------------------- /* * OnLocalPartyGame */ private void OnLocalPartyGame() { if (MenuScreenController.Instance.EnableAppOrganization) { UIEventController.Instance.DispatchUIEvent(EVENT_SCREENMAIN_LOCAL_OR_REMOTE_PARTY, true); GoBackPressed(); } else { NetworkEventController.Instance.MenuController_SetLocalGame(true); SoundsController.Instance.PlaySingleSound(SoundsConfiguration.SOUND_SELECTION_FX); #if UNITY_STANDALONE CardboardLoaderVR.Instance.SaveEnableCardboard(false); MultiplayerConfiguration.SaveDirectorMode(MultiplayerConfiguration.DIRECTOR_MODE_DISABLED); MultiplayerConfiguration.SaveGoogleARCore(MultiplayerConfiguration.GOOGLE_ARCORE_DISABLED); MenuScreenController.Instance.ScreenGameOptions = ScreenCharacterSelectionView.SCREEN_NAME; MenuScreenController.Instance.CreateRoomInServer(1, MultiplayerConfiguration.LoadExtraData()); #else UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_GENERIC_SCREEN, ScreenMenuLocalGameView.SCREEN_NAME, UIScreenTypePreviousAction.DESTROY_ALL_SCREENS, false, null); #endif } }
// ------------------------------------------- /* * CreateGamePressed */ public void CreateGamePressed() { SoundsController.Instance.PlaySingleSound(SoundsConfiguration.SOUND_SELECTION_FX); if (MenuScreenController.Instance.ForceFixedPlayers != -1) { MenuScreenController.Instance.CreateRoomInServer(MenuScreenController.Instance.ForceFixedPlayers, MultiplayerConfiguration.LoadExtraData()); } else { if (MenuScreenController.Instance.AlphaAnimationNameStack != -1) { UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_LAYER_GENERIC_SCREEN, -1, new List <object> { ScreenController.ANIMATION_ALPHA, 0f, 1f, MenuScreenController.Instance.AlphaAnimationNameStack }, ScreenMenuNumberPlayersView.SCREEN_NAME, UIScreenTypePreviousAction.DESTROY_ALL_SCREENS, false, null); } else { UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_GENERIC_SCREEN, ScreenMenuNumberPlayersView.SCREEN_NAME, UIScreenTypePreviousAction.DESTROY_ALL_SCREENS, false, null); } } }