Exemple #1
0
 private bool onCameraLogicChangeEvent(CinematographyEvents.CameraLogicChangeEvent evt)
 {
     isSuspended |= evt.DisablePostEffects;
     if (isSuspended)
     {
         reset();
     }
     return(false);
 }
Exemple #2
0
 private bool OnCameraLogicChangeEvent(CinematographyEvents.CameraLogicChangeEvent evt)
 {
     ActiveCamera.Set(evt.Controller, evt.ForceCutTransition);
     return(false);
 }
Exemple #3
0
        public override void OnEnter()
        {
            ChangeCameraActionSettings changeCameraActionSettings = PlatformUtils.FindAspectRatioSettings(OverrideSettings);

            if (changeCameraActionSettings != null)
            {
                applySettings(changeCameraActionSettings);
            }
            dispatcher           = Service.Get <EventDispatcher>();
            controllerGameObject = GameObject.Find(ControllerName);
            if ((bool)controllerGameObject)
            {
                controller = controllerGameObject.GetComponent <CameraController>();
            }
            else
            {
                Disney.LaunchPadFramework.Log.LogError(this, "Unable to find Camera Setup called " + ControllerName);
            }
            if (controller == null)
            {
                Disney.LaunchPadFramework.Log.LogError(this, "Provided GameObject " + ControllerName + " does not contain a controller, but one is required.");
                Finish();
            }
            else if (!WaitForCameraToComplete && ResetOnExit)
            {
                Finish();
            }
            else
            {
                CinematographyEvents.CameraLogicChangeEvent evt = default(CinematographyEvents.CameraLogicChangeEvent);
                originalCameraPriority = controller.Priority;
                if (!PreserveCameraPriority)
                {
                    controller.Priority = defaultAdventureCameraPriority;
                }
                controller.IsScripted  = true;
                evt.Controller         = controller;
                evt.DisablePostEffects = true;
                evt.ForceCutTransition = ForceCutTransition;
                dispatcher.DispatchEvent(evt);
            }
            if (StoreOriginalCameraPosition != null && StoreOriginalCameraPosition.Value != Vector3.zero)
            {
                StoreOriginalCameraPosition.Value = controllerGameObject.transform.position;
            }
            if (CameraPosition != null && CameraPosition.Value != Vector3.zero)
            {
                controllerGameObject.transform.position = CameraPosition.Value;
            }
            if (!string.IsNullOrEmpty(TargetName))
            {
                GameObject gameObject = GameObject.Find(TargetName);
                if (gameObject != null)
                {
                    Service.Get <EventDispatcher>().DispatchEvent(new CinematographyEvents.ChangeCameraTarget(gameObject.transform));
                }
            }
            if (!WaitForCameraToComplete)
            {
                Finish();
            }
        }
 public void OnTriggerEnter(Collider col)
 {
     CinematographyEvents.CameraLogicChangeEvent evt = default(CinematographyEvents.CameraLogicChangeEvent);
     evt.Controller = controller;
     dispatcher.DispatchEvent(evt);
 }