/// <summary>
 /// Triggers a priority change on listening virtual cameras
 /// </summary>
 /// <param name="position"></param>
 /// <param name="attenuation"></param>
 protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f)
 {
     if (Active)
     {
         MMCinemachinePriorityEvent.Trigger(Channel, ForceMaxPriority, NewPriority, ForceTransition, BlendDefintion, ResetValuesAfterTransition);
     }
 }
 /// <summary>
 /// Stops listening for events
 /// </summary>
 protected virtual void OnDisable()
 {
     if (_coroutine != null)
     {
         StopCoroutine(_coroutine);
     }
     _coroutine = null;
     MMCinemachinePriorityEvent.Unregister(OnMMCinemachinePriorityEvent);
 }
Beispiel #3
0
 /// <summary>
 /// Triggers a priority change on listening virtual cameras
 /// </summary>
 /// <param name="position"></param>
 /// <param name="feedbacksIntensity"></param>
 protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
 {
     if (Active)
     {
         _tempBlend        = BlendDefintion;
         _tempBlend.m_Time = FeedbackDuration;
         if (Mode == Modes.Event)
         {
             MMCinemachinePriorityEvent.Trigger(Channel, ForceMaxPriority, NewPriority, ForceTransition, _tempBlend, ResetValuesAfterTransition, Timing.TimescaleMode);
         }
         else
         {
             MMCinemachinePriorityEvent.Trigger(Channel, ForceMaxPriority, 0, ForceTransition, _tempBlend, ResetValuesAfterTransition, Timing.TimescaleMode);
             TargetVirtualCamera.Priority = NewPriority;
         }
     }
 }
 /// <summary>
 /// On enable we start listening for events
 /// </summary>
 protected virtual void OnEnable()
 {
     _coroutine = null;
     MMCinemachinePriorityEvent.Register(OnMMCinemachinePriorityEvent);
 }
 /// <summary>
 /// Stops listening for events
 /// </summary>
 protected virtual void OnDisable()
 {
     MMCinemachinePriorityEvent.Unregister(OnMMCinemachinePriorityEvent);
 }
 /// <summary>
 /// On enable we start listening for events
 /// </summary>
 protected virtual void OnEnable()
 {
     MMCinemachinePriorityEvent.Register(OnMMCinemachinePriorityEvent);
 }