コード例 #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)
 {
     base.CustomStopFeedback(position, feedbacksIntensity);
     if (Active)
     {
         MMAudioSourcePitchShakeEvent.Trigger(PitchTween, FeedbackDuration, RemapPitchZero, RemapPitchOne, RelativePitch, stop: true);
     }
 }
コード例 #2
0
 /// <summary>
 /// Triggers the corresponding coroutine
 /// </summary>
 /// <param name="position"></param>
 /// <param name="attenuation"></param>
 protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f)
 {
     if (Active)
     {
         MMAudioSourcePitchShakeEvent.Trigger(PitchTween, Duration, RemapPitchZero, RemapPitchOne, RelativePitch,
                                              attenuation, Channel, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake);
     }
 }
コード例 #3
0
 /// <summary>
 /// Triggers the corresponding coroutine
 /// </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;
         MMAudioSourcePitchShakeEvent.Trigger(PitchTween, FeedbackDuration, RemapPitchZero, RemapPitchOne, RelativePitch,
                                              intensityMultiplier, Channel, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake, NormalPlayDirection, Timing.TimescaleMode);
     }
 }
コード例 #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);
     MMAudioSourcePitchShakeEvent.Trigger(PitchTween, FeedbackDuration, RemapPitchZero, RemapPitchOne, RelativePitch, stop: true);
 }
コード例 #5
0
 /// <summary>
 /// Stops listening for events
 /// </summary>
 public override void StopListening()
 {
     base.StopListening();
     MMAudioSourcePitchShakeEvent.Unregister(OnMMAudioSourcePitchShakeEvent);
 }