protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f) { if (Active) { MMColorGradingShakeEvent.Trigger(ShakeDuration, PostExposure, PostExposureAmplitude, HueShift, HueShiftAmplitude, Saturation, SaturationAmplitude, Contrast, ContrastAmplitude, RelativeIntensity, attenuation, Channel); } }
/// <summary> /// Triggers a color grading shake /// </summary> /// <param name="position"></param> /// <param name="attenuation"></param> protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f) { if (Active) { MMColorGradingShakeEvent.Trigger(ShakePostExposure, RemapPostExposureZero, RemapPostExposureOne, ShakeHueShift, RemapHueShiftZero, RemapHueShiftOne, ShakeSaturation, RemapSaturationZero, RemapSaturationOne, ShakeContrast, RemapContrastZero, RemapContrastOne, ShakeDuration, RelativeIntensity, attenuation, Channel, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake); } }
/// <summary> /// Triggers a color grading shake /// </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; MMColorGradingShakeEvent.Trigger(ShakePostExposure, RemapPostExposureZero, RemapPostExposureOne, ShakeHueShift, RemapHueShiftZero, RemapHueShiftOne, ShakeSaturation, RemapSaturationZero, RemapSaturationOne, ShakeContrast, RemapContrastZero, RemapContrastOne, FeedbackDuration, RelativeIntensity, intensityMultiplier, Channel, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake, NormalPlayDirection, Timing.TimescaleMode); } }
/// <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) { MMColorGradingShakeEvent.Trigger(ShakePostExposure, RemapPostExposureZero, RemapPostExposureOne, ShakeHueShift, RemapHueShiftZero, RemapHueShiftOne, ShakeSaturation, RemapSaturationZero, RemapSaturationOne, ShakeContrast, RemapContrastZero, RemapContrastOne, FeedbackDuration, stop: true); } }
/// <summary> /// Stops listening for events /// </summary> public override void StopListening() { base.StopListening(); MMColorGradingShakeEvent.Unregister(OnMMColorGradingShakeEvent); }
protected virtual void OnDisable() { MMColorGradingShakeEvent.Unregister(OnMMColorGradingShakeEvent); }
protected virtual void OnEnable() { MMColorGradingShakeEvent.Register(OnMMColorGradingShakeEvent); }