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
 protected override void startGame()
 {
     loadAudioPrefab(partyGameDefinition);
     totalItemsHidden     = 0;
     totalItemsFound      = 0;
     otherPlayerSessionId = ((base.players[0].UserSessionId == localPlayerSessionId) ? base.players[1].UserSessionId : base.players[0].UserSessionId);
     scavengerHuntData    = new ScavengerHuntData(base.sessionId, localPlayerSessionId, otherPlayerSessionId, scavengerHuntDefinition.MaxHiddenItems, partyGameDefinition.Rewards[0].Reward, partyGameDefinition.Rewards[1].Reward);
     changeState(ScavengerHuntState.AwaitingRoles);
     PartyGameUtils.AddParticipationFilter(localPlayerParticipationController);
     PartyGameUtils.AddActionConfirmationFilter(partyGameDefinition);
     disableMainNavigation();
     if (base.players[0].UserSessionId == localPlayerSessionId)
     {
         PartyGameUtils.LogGameStartBi(partyGameDefinition.name, base.players.Count);
         PartyGameUtils.StartBiTimer(partyGameDefinition.name, base.sessionId);
     }
     Service.Get <EventDispatcher>().DispatchEvent(new PartyGameEvents.PartyGameStarted(partyGameDefinition));
 }
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));
 }