Esempio n. 1
0
 public override void OnEnter()
 {
     dispatcher = Service.Get <EventDispatcher>();
     if (UnsuppressQuestNotifier)
     {
         dispatcher.DispatchEvent(new HudEvents.SuppressQuestNotifier(suppress: false));
     }
     if (ShowControls)
     {
         GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Tray_Root);
         if (gameObject != null)
         {
             StateMachineContext component = gameObject.GetComponent <StateMachineContext>();
             component.SendEvent(new ExternalEvent("Root", "exit_cinematic"));
         }
         Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.EnableUIElementGroup("MainNavButtons"));
         Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.EnableUIElement("ChatButtons"));
     }
     if (ShowRemotePlayers)
     {
         RemotePlayerVisibilityState.ShowRemotePlayers();
     }
     if (ShowLocalPlayer)
     {
         Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("LocalPlayer");
     }
     if (ShowInWorldText)
     {
         dispatcher.DispatchEvent(default(InWorldUIEvents.EnableInWorldText));
     }
     if (EnablePlayerCard)
     {
         dispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: true));
     }
     if (ShowActionIndicators)
     {
         dispatcher.DispatchEvent(default(InWorldUIEvents.EnableActionIndicators));
     }
     Finish();
 }
Esempio n. 2
0
 private void deactivateQuest(Quest.QuestState state, bool doCleanup = true)
 {
     if (ActiveQuest != null)
     {
         trace("Deactivating quest {0} with state {1}", ActiveQuest.Id, state);
         ActiveQuest.Deactivate(state);
         if (state == Quest.QuestState.Suspended)
         {
             Mascot mascot = questToMascotMap[ActiveQuest.Id];
             mascot.ResumableQuests.Add(ActiveQuest);
         }
         ActiveQuest = null;
         Service.Get <ZonePathing>().ClearWaypoint();
     }
     Service.Get <TutorialBreadcrumbController>().RemoveAllBreadcrumbs();
     if (doCleanup)
     {
         dispatcher.DispatchEvent(default(HudEvents.ResetQuestNotifier));
         RemotePlayerVisibilityState.ShowRemotePlayers();
     }
     Service.Get <EventDispatcher>().DispatchEvent(default(CinematographyEvents.ClearGroupCullingOverride));
     setPlayerOutOfWorld(isOutOfWorld: false);
 }
 private void finishMinigame()
 {
     if (fishingRod != null)
     {
         SetBobberHierarchy(doSet: false);
         fishingRodAnimator.enabled = true;
     }
     RemotePlayerVisibilityState.ShowRemotePlayers();
     resetCameraToPenguin();
     resetAnimators();
     if (fishingRod != null)
     {
         PropCancel component = fishingRod.GetComponent <PropCancel>();
         if (component != null)
         {
             component.enabled = true;
         }
     }
     eventDispatcher.DispatchEvent(new ControlsScreenEvents.SetButton(fishingRodContentKey, 0));
     eventDispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: true));
     eventDispatcher.DispatchEvent(new UIDisablerEvents.EnableUIElementGroup("MainNavButtons"));
     eventDispatcher.DispatchEvent(new UIDisablerEvents.EnableUIElement("ChatButtons"));
     userControl.enabled = true;
     eventDispatcher.DispatchEvent(new UIDisablerEvents.EnableUIElement("Joystick"));
     locomotionBroadcaster.BroadcastOnControlsUnLocked();
     eventDispatcher.DispatchEvent(default(FishingEvents.FishingGameComplete));
     eventDispatcher.DispatchEvent(default(HudEvents.UnsuppressCoinDisplay));
     CoroutineRunner.StopAllForOwner(this);
     removeLoadedAssets();
     Service.Get <ICPSwrveService>().EndTimer("fishing_time");
     UnityEngine.Object.Destroy(base.gameObject);
     if (fishingRod != null)
     {
         Service.Get <PropService>().LocalPlayerRetrieveProp("FishingRod");
     }
 }
 public override void OnEnter()
 {
     RemotePlayerVisibilityState.ShowRemotePlayers();
     Finish();
 }
Esempio n. 5
0
 private void showRemotePlayers()
 {
     RemotePlayerVisibilityState.ShowRemotePlayers();
 }