Beispiel #1
0
 /// <summary>
 /// On Play we trigger a flash event
 /// </summary>
 /// <param name="position"></param>
 /// <param name="attenuation"></param>
 protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f)
 {
     if (Active)
     {
         MMFlashEvent.Trigger(FlashColor, FlashDuration * attenuation, FlashAlpha, FlashID, Channel);
     }
 }
Beispiel #2
0
 /// <summary>
 /// On Play we trigger a flash event
 /// </summary>
 /// <param name="position"></param>
 /// <param name="feedbacksIntensity"></param>
 protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
 {
     if (Active)
     {
         float intensityMultiplier = Timing.ConstantIntensity ? 1f : feedbacksIntensity;
         MMFlashEvent.Trigger(FlashColor, FeedbackDuration * intensityMultiplier, FlashAlpha, FlashID, Channel);
     }
 }
Beispiel #3
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)
 {
     base.CustomStopFeedback(position, feedbacksIntensity);
     if (Active)
     {
         MMFlashEvent.Trigger(FlashColor, FeedbackDuration, FlashAlpha, FlashID, Channel, Timing.TimescaleMode, stop: true);
     }
 }
Beispiel #4
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);
     MMFlashEvent.Trigger(FlashColor, FeedbackDuration, FlashAlpha, FlashID, Channel, Timing.TimescaleMode, stop: true);
 }
Beispiel #5
0
        /// <summary>
        /// On Play we trigger a flash event
        /// </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;

            MMFlashEvent.Trigger(FlashColor, FeedbackDuration * intensityMultiplier, FlashAlpha, FlashID, Channel, Timing.TimescaleMode);
        }
Beispiel #6
0
 /// <summary>
 /// On disable we stop listening for events
 /// </summary>
 protected virtual void OnDisable()
 {
     MMFlashEvent.Unregister(OnMMFlashEvent);
 }
Beispiel #7
0
 /// <summary>
 /// On enable we start listening for events
 /// </summary>
 protected virtual void OnEnable()
 {
     MMFlashEvent.Register(OnMMFlashEvent);
 }
Beispiel #8
0
 public virtual void DebugTest()
 {
     MMFlashEvent.Trigger(DebugSettings.FlashColor, DebugSettings.FlashDuration, DebugSettings.FlashAlpha, DebugSettings.FlashID, DebugSettings.Channel);
 }
Beispiel #9
0
 public virtual void DebugTest()
 {
     MMFlashEvent.Trigger(DebugSettings.FlashColor, DebugSettings.FlashDuration, DebugSettings.FlashAlpha, DebugSettings.FlashID, DebugSettings.Channel, TimescaleModes.Unscaled);
 }