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()
 {
     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));
 }