示例#1
0
 private void changeToDefaultCamera()
 {
     CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
     evt.Controller = currentCameraController;
     dispatcher.DispatchEvent(evt);
     dispatcher.DispatchEvent(new CinematographyEvents.ChangeCameraTarget(SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.transform));
 }
    private void resetCamera()
    {
        GameObject gameObject = GameObject.Find(CameraControllerName);

        if (gameObject != null)
        {
            controller = gameObject.GetComponent <CameraController>();
            if (controller != null)
            {
                CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
                evt.Controller = controller;
                dispatcher.DispatchEvent(evt);
                GameObject localPlayerGameObject = ClubPenguin.SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject;
                if (localPlayerGameObject != null)
                {
                    Service.Get <EventDispatcher>().DispatchEvent(new CinematographyEvents.ChangeCameraTarget(localPlayerGameObject.transform));
                }
                else
                {
                    Disney.LaunchPadFramework.Log.LogError(this, "Unable to find Camera Target for Local Player");
                }
            }
            else
            {
                Disney.LaunchPadFramework.Log.LogError(this, "Provided GameObject " + CameraControllerName + " does not contain a camera controller, but one is required.");
            }
        }
        else
        {
            Disney.LaunchPadFramework.Log.LogError(this, "Unable to find Camera Setup called " + CameraControllerName);
        }
    }
 private void fishingRodReelingCameraZoom()
 {
     sendCameraEvent(cinematicCameraFishingControllerZoom);
     eventDispatcher.DispatchEvent(new CinematographyEvents.ChangeCameraTarget(player.transform));
     CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
     evt.Controller = cinematicCameraFishingController;
     eventDispatcher.DispatchEvent(evt);
     Invoke("parentPrizeDropToAnimator", config.PrizeDropDelay);
 }
 private void resetCameraEvent()
 {
     CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
     evt.Controller = cinematicCameraFishingController;
     eventDispatcher.DispatchEvent(evt);
     CinematographyEvents.CameraLogicResetEvent evt2 = default(CinematographyEvents.CameraLogicResetEvent);
     evt2.Controller = cinematicCameraFishingControllerZoom;
     eventDispatcher.DispatchEvent(evt2);
 }
示例#5
0
 private void resetCamera()
 {
     if (cameraController != null && cameraController.gameObject != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         evt.Controller = cameraController;
         Service.Get <EventDispatcher>().DispatchEvent(evt);
         UnityEngine.Object.Destroy(cameraController.gameObject);
     }
 }
 private void onPopupClosed()
 {
     trayFSMContext.SendEvent(new ExternalEvent("Root", "restoreUI"));
     Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.EnableUIElement("CellphoneButton"));
     GetComponent <ParticipationObserver>().enabled = true;
     CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
     evt.Controller = Camera;
     dispatcher.DispatchEvent(evt);
     dispatcher.DispatchEvent(new CinematographyEvents.ChangeCameraTarget(SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.transform));
 }
示例#7
0
 public override void OnExit()
 {
     if (ResetOnExit && controller != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         controller.Priority   = originalCameraPriority;
         controller.IsScripted = false;
         evt.Controller        = controller;
         dispatcher.DispatchEvent(evt);
     }
 }
示例#8
0
 private void restoreCamera()
 {
     if (IsOwnerLocalPlayer && customCameraInstance != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         evt.Controller = customCameraInstance;
         Service.Get <EventDispatcher>().DispatchEvent(evt);
         UnityEngine.Object.Destroy(customCameraInstance.gameObject);
         customCameraInstance = null;
     }
 }
示例#9
0
        private void ResetCamera()
        {
            CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
            GameObject gameObject = ((PlatformUtils.GetPlatformType() == PlatformType.Mobile) ? board.CameraPosition : board.StandaloneCameraPosition);

            evt.Controller = gameObject.GetComponent <CameraController>();
            dispatcher.DispatchEvent(evt);
            dispatcher.DispatchEvent(new CinematographyEvents.ChangeCameraTarget(localPlayerGameObject.transform));
            Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("AllPlayerInteractibles");
            Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("PhysicsObjects");
            Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("LocalPlayer");
        }
 private void updateRail(CameraController newCameraControllerRail)
 {
     if (currentRailCameraController != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         evt.Controller = currentRailCameraController;
         eventDispatcher.DispatchEvent(evt);
     }
     CinematographyEvents.CameraLogicChangeEvent evt2 = default(CinematographyEvents.CameraLogicChangeEvent);
     evt2.Controller = newCameraControllerRail;
     eventDispatcher.DispatchEvent(evt2);
     currentRailCameraController = newCameraControllerRail;
 }
 private void resetCamera()
 {
     if (profileCameraController != null && profileCameraController.gameObject != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         evt.Controller = profileCameraController;
         EventDispatcher eventDispatcher = Service.Get <EventDispatcher>();
         if (eventDispatcher != null)
         {
             Service.Get <EventDispatcher>().DispatchEvent(evt);
             Object.Destroy(profileCameraController.gameObject);
         }
     }
 }
示例#12
0
 private void changeCameraController(CameraController controller, Transform cameraTarget, bool hideControls)
 {
     if (currentCameraController != null)
     {
         CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
         evt.Controller = currentCameraController;
         dispatcher.DispatchEvent(evt);
     }
     CinematographyEvents.CameraLogicChangeEvent evt2 = default(CinematographyEvents.CameraLogicChangeEvent);
     evt2.Controller         = controller;
     currentCameraController = controller;
     dispatcher.DispatchEvent(evt2);
     dispatcher.DispatchEvent(new CinematographyEvents.ChangeCameraTarget(cameraTarget));
     if (hideControls)
     {
         trayFSMContext.SendEvent(new ExternalEvent("Root", "minnpc"));
     }
     else
     {
         trayFSMContext.SendEvent(new ExternalEvent("Root", "exit_cinematic"));
     }
 }
示例#13
0
    protected override void OnEnable()
    {
        if (!Owner.CompareTag("Player"))
        {
            return;
        }
        EventDispatcher  eventDispatcher   = Service.Get <EventDispatcher>();
        MascotController componentInParent = ClubPenguin.SceneRefs.ActionSequencer.GetTrigger(Owner).GetComponentInParent <MascotController>();

        mascot = componentInParent.Mascot;
        if (mascot.InteractionBehaviours.ZoomOut && Controller != null)
        {
            CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
            evt.Controller = Controller;
            eventDispatcher.DispatchEvent(evt);
        }
        if (mascot.InteractionBehaviours.RestoreTray)
        {
            GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Tray_Root);
            if (gameObject != null)
            {
                StateMachineContext component = gameObject.GetComponent <StateMachineContext>();
                component.SendEvent(new ExternalEvent("Root", "exit_cinematic"));
                if (!string.IsNullOrEmpty(ScreenName))
                {
                    component.SendEvent(new ExternalEvent("ScreenContainerContent", ScreenName));
                }
            }
            eventDispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: true));
            eventDispatcher.DispatchEvent(new UIDisablerEvents.EnableUIElementGroup("MainNavButtons"));
        }
        if (mascot.InteractionBehaviours.RestoreQuestNotifier)
        {
            eventDispatcher.DispatchEvent(new HudEvents.SuppressQuestNotifier(suppress: false));
        }
    }
 private bool onCameraLogicResetEvent(CinematographyEvents.CameraLogicResetEvent evt)
 {
     isSuspended = false;
     return(false);
 }
示例#15
0
 public void OnTriggerExit(Collider col)
 {
     CinematographyEvents.CameraLogicResetEvent evt = default(CinematographyEvents.CameraLogicResetEvent);
     evt.Controller = controller;
     dispatcher.DispatchEvent(evt);
 }
示例#16
0
 private bool OnCameraLogicResetEvent(CinematographyEvents.CameraLogicResetEvent evt)
 {
     ActiveCamera.Clear(evt.Controller);
     return(false);
 }