예제 #1
0
        /// <summary>
        /// On stop we stop our transition
        /// </summary>
        /// <param name="position"></param>
        /// <param name="feedbacksIntensity"></param>
        protected override void CustomStopFeedback(Vector3 position, float feedbacksIntensity = 1)
        {
            if (!Active || !FeedbackTypeAuthorized)
            {
                return;
            }
            base.CustomStopFeedback(position, feedbacksIntensity);

            MMDepthOfFieldShakeEvent.Trigger(ShakeFocusDistance, FeedbackDuration, RemapFocusDistanceZero, RemapFocusDistanceOne,
                                             ShakeAperture, RemapApertureZero, RemapApertureOne,
                                             ShakeFocalLength, RemapFocalLengthZero, RemapFocalLengthOne,
                                             RelativeValues, stop: true);
        }
예제 #2
0
        /// <summary>
        /// Triggers a DoF shake
        /// </summary>
        /// <param name="position"></param>
        /// <param name="feedbacksIntensity"></param>
        protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
        {
            if (!Active || !FeedbackTypeAuthorized)
            {
                return;
            }

            float intensityMultiplier = Timing.ConstantIntensity ? 1f : feedbacksIntensity;

            MMDepthOfFieldShakeEvent.Trigger(ShakeFocusDistance, FeedbackDuration, RemapFocusDistanceZero, RemapFocusDistanceOne,
                                             ShakeAperture, RemapApertureZero, RemapApertureOne,
                                             ShakeFocalLength, RemapFocalLengthZero, RemapFocalLengthOne,
                                             RelativeValues, intensityMultiplier, Channel, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake, NormalPlayDirection, Timing.TimescaleMode);
        }
예제 #3
0
 protected virtual void OnDisable()
 {
     MMDepthOfFieldShakeEvent.Unregister(OnDepthOfFieldShakeEvent);
 }
예제 #4
0
 protected virtual void OnEnable()
 {
     MMDepthOfFieldShakeEvent.Register(OnDepthOfFieldShakeEvent);
 }
예제 #5
0
 /// <summary>
 /// Stops listening for events
 /// </summary>
 public override void StopListening()
 {
     base.StopListening();
     MMDepthOfFieldShakeEvent.Unregister(OnDepthOfFieldShakeEvent);
 }