Esempio n. 1
0
        protected override void startGame()
        {
            hideRemotePlayers();
            loadAudioPrefab(partyGameDefinition);
            changeState(FindFourState.Intro);
            PartyGameUtils.AddParticipationFilter(localPlayerParticipationController);
            PartyGameUtils.AddActionConfirmationFilter(partyGameDefinition);
            PartyGameUtils.DisableMainNavigation();
            PartyGameUtils.DisableLocomotionControls();
            Vector3          position = default(Vector3);
            DataEntityHandle handle   = Service.Get <CPDataEntityCollection>().FindEntity <SessionIdData, long>(base.players[0].UserSessionId);

            if (dataEntityCollection.TryGetComponent <GameObjectReferenceData>(handle, out var component))
            {
                position = component.GameObject.transform.position;
            }
            CoroutineRunner.Start(createBoard(position), this, "CreateFindFourBoard");
            Content.LoadAsync(onHudPrefabLoaded, HUD_UI_PREFAB_KEY);
            dispatcher.AddListener <InputEvents.ActionEvent>(onActionEvent);
            changeControlState(ControlsState.Disabled);
            if (base.players[0].UserSessionId == localPlayerSessionId)
            {
                PartyGameUtils.LogGameStartBi(partyGameDefinition.name, base.players.Count);
                PartyGameUtils.StartBiTimer(partyGameDefinition.name, base.sessionId);
            }
            if (!disablerManager.IsUIElementDisabled("CellphoneButton"))
            {
                PartyGameUtils.DisableCellPhoneButton();
            }
            Service.Get <EventDispatcher>().DispatchEvent(new PartyGameEvents.PartyGameStarted(partyGameDefinition));
            dispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: false));
        }
Esempio n. 2
0
 protected override void startGame()
 {
     addEventListeners();
     localPlayer = getPartyGamePlayerById(Service.Get <CPDataEntityCollection>().LocalPlayerSessionId);
     PartyGameUtils.AddParticipationFilter(localPlayerParticipationController);
     PartyGameUtils.AddActionConfirmationFilter(partyGameDefinition, "DanceBattleExitPrompt");
     Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.DisableUIElement("ChatButtons", hideElement: true));
     PartyGameUtils.DisableCellPhoneButton(hide: true);
     changeControlState(ControlsState.Disabled);
 }
Esempio n. 3
0
 private void handleLocalPlayerJoinedLobby()
 {
     isLocalPlayerInLobby = true;
     Service.Get <EventDispatcher>().DispatchEvent(default(TubeRaceEvents.LocalPlayerJoinedLobby));
     moveLocalPlayerToPosition(LobbyPosition.position);
     LocomotionHelper.SetCurrentController <SlideController>(SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject);
     Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.DisableUIElement("ControlsButton2"));
     Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.DisableUIElement("ActionButton"));
     PartyGameUtils.DisableMainNavigation();
     PartyGameUtils.DisableCellPhoneButton(hide: true);
     Service.Get <EventDispatcher>().DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: false));
     Service.Get <EventDispatcher>().DispatchEvent(default(PlayerCardEvents.DismissPlayerCard));
     Service.Get <QuestService>().SendEvent($"Join{RaceDefinition.QuestEventIdentifier}Race");
     Service.Get <ICPSwrveService>().Action("tube_race", "lobby");
 }
Esempio n. 4
0
 protected override void startGame()
 {
     loadAudioPrefab(partyGameDefinition);
     changeState(FishBucketState.AwaitingPositions);
     PartyGameUtils.AddParticipationFilter(localPlayerParticipationController);
     PartyGameUtils.AddActionConfirmationFilter(partyGameDefinition);
     PartyGameUtils.DisableMainNavigation();
     PartyGameUtils.DisableLocomotionControls();
     initPlayerData();
     Content.LoadAsync(onHudPrefabLoaded, HUD_UI_PREFAB_KEY);
     setAnimationControllerPlayers();
     if (base.players[0].UserSessionId == localPlayerSessionId)
     {
         PartyGameUtils.LogGameStartBi(partyGameDefinition.name, base.players.Count);
         PartyGameUtils.StartBiTimer(partyGameDefinition.name, base.sessionId);
     }
     if (!Service.Get <UIElementDisablerManager>().IsUIElementDisabled("CellphoneButton"))
     {
         PartyGameUtils.DisableCellPhoneButton();
     }
     Service.Get <EventDispatcher>().DispatchEvent(new PartyGameEvents.PartyGameStarted(partyGameDefinition));
 }
 private void Start()
 {
     PartyGameUtils.DisableCellPhoneButton();
 }