Esempio n. 1
0
 private void OnDestroy()
 {
     if (!partyGameStarted)
     {
         PartyGameUtils.EnableCellPhoneButton();
     }
     Service.Get <EventDispatcher>().RemoveListener <PartyGameEvents.PartyGameStarted>(onPartyGameStarted);
 }
 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);
 }
 private bool onSceneTransition(SceneTransitionEvents.TransitionStart evt)
 {
     dispatcher.RemoveListener <SceneTransitionEvents.TransitionStart>(onSceneTransition);
     PartyGameUtils.EnableMainNavigation();
     PartyGameUtils.EnableLocomotionControls();
     PartyGameUtils.EnableCellPhoneButton();
     enableDanceMoveControls();
     dispatcher.RemoveListener <ControlsScreenEvents.ControlLayoutLoadComplete>(onControlLayoutLoadComplete);
     return(false);
 }
 private void logPropSharedBi()
 {
     if (propExperience.PropDef.ExperienceType == PropDefinition.ConsumableExperience.PartyGameLobby)
     {
         PartyGameDefinition partyGameForTriggerProp = PartyGameUtils.GetPartyGameForTriggerProp(propExperience.PropDef.Id);
         if (partyGameForTriggerProp != null)
         {
             Service.Get <ICPSwrveService>().Action("party_game", "offer", partyGameForTriggerProp.name);
         }
     }
 }
Esempio n. 5
0
    private void getPartyGameDefinitionForLocalPlayerPropExperience()
    {
        PropExperience componentInChildren = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponentInChildren <PropExperience>();

        if (componentInChildren == null)
        {
            UnityEngine.Object.Destroy(this);
        }
        partyGameDefinition = PartyGameUtils.GetPartyGameForTriggerProp(componentInChildren.PropDef.Id);
        if (partyGameDefinition == null)
        {
            UnityEngine.Object.Destroy(this);
        }
    }
 protected override void destroy()
 {
     PartyGameUtils.EnableMainNavigation();
     PartyGameUtils.RemoveParticipationFilter(localPlayerParticipationController);
     PartyGameUtils.RemoveActionConfirmationFilter();
     PartyGameUtils.EnableCellPhoneButton();
     removeEventListeners();
     changeToDefaultCamera();
     changeControlState(ControlsState.Enabled);
     Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.EnableUIElement("ChatButtons"));
     if (danceBattleVisualsController != null)
     {
         danceBattleVisualsController.RemoveTopHud();
     }
 }
    public DanceBattle()
    {
        dataEntityCollection = Service.Get <CPDataEntityCollection>();
        dispatcher           = Service.Get <EventDispatcher>();
        eventChannel         = new EventChannel(dispatcher);
        localPlayerSessionId = dataEntityCollection.LocalPlayerSessionId;
        partyGameDefinition  = getPartyGameDefinition(3);
        localPlayerParticipationController = ClubPenguin.SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <ParticipationController>();
        PartyGameUtils.DisableMainNavigation();
        GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Tray_Root);

        if (gameObject != null)
        {
            trayFSMContext = gameObject.GetComponent <StateMachineContext>();
        }
    }
Esempio n. 8
0
 private void Start()
 {
     PartyGameUtils.DisableCellPhoneButton();
 }