MMFeedbacks
v1.6
|
Add this to an audio echo filter to shake its values remapped along a curve More...
Public Member Functions | |
virtual void | OnMMAudioFilterEchoShakeEvent (AnimationCurve echoCurve, float duration, float remapMin, float remapMax, bool relativeEcho=false, float attenuation=1.0f, int channel=0, bool resetShakerValuesAfterShake=true, bool resetTargetValuesAfterShake=true) |
When we get the appropriate event, we trigger a shake More... | |
override void | StartListening () |
Starts listening for events More... | |
override void | StopListening () |
Stops listening for events More... | |
Public Member Functions inherited from MoreMountains.Feedbacks.MMShaker | |
virtual void | StartShaking () |
Starts shaking the values More... | |
virtual void | Play () |
Starts this shaker More... | |
Public Attributes | |
bool | RelativeEcho = false |
whether or not to add to the initial value More... | |
AnimationCurve | ShakeEcho = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0)) |
the curve used to animate the intensity value on More... | |
float | RemapEchoZero = 0f |
the value to remap the curve's 0 to More... | |
float | RemapEchoOne = 1f |
the value to remap the curve's 1 to More... | |
Public Attributes inherited from MoreMountains.Feedbacks.MMShaker | |
int | Channel = 0 |
the channel to listen to More... | |
float | ShakeDuration = 0.2f |
the duration of the shake, in seconds More... | |
bool | PlayOnAwake = false |
if this is true this shaker will play on awake More... | |
bool | Shaking = false |
whether or not this shaker is shaking right now More... | |
bool | ListeningToEvents => _listeningToEvents |
Protected Member Functions | |
override void | Initialization () |
On init we initialize our values More... | |
virtual void | Reset () |
When that shaker gets added, we initialize its shake duration More... | |
override void | Shake () |
Shakes values over time More... | |
override void | GrabInitialValues () |
Collects initial values on the target More... | |
override void | ResetTargetValues () |
Resets the target's values More... | |
override void | ResetShakerValues () |
Resets the shaker's values More... | |
Protected Member Functions inherited from MoreMountains.Feedbacks.MMShaker | |
virtual void | Awake () |
On Awake we grab our volume and profile More... | |
virtual void | ShakeStarts () |
Describes what happens when a shake starts More... | |
virtual void | Update () |
On Update, we shake our values if needed, or reset if our shake has ended More... | |
virtual float | ShakeFloat (AnimationCurve curve, float remapMin, float remapMax, bool relativeIntensity, float initialValue) |
A method used to "shake" a flot over time along a curve More... | |
virtual void | ShakeComplete () |
Describes what happens when the shake is complete More... | |
virtual void | OnEnable () |
On enable we start shaking if needed More... | |
virtual void | OnDestroy () |
On destroy we stop listening for events More... | |
virtual void | OnDisable () |
On disable we complete our shake if it was in progress More... | |
virtual bool | CheckEventAllowed (int channel, bool useRange=false, float range=0f, Vector3 eventOriginPosition=default(Vector3)) |
Returns true if this shaker should listen to events, false otherwise More... | |
Protected Attributes | |
AudioEchoFilter | _targetAudioEchoFilter |
the audio source to pilot More... | |
float | _initialEcho |
float | _originalShakeDuration |
bool | _originalRelativeEcho |
AnimationCurve | _originalShakeEcho |
float | _originalRemapEchoZero |
float | _originalRemapEchoOne |
Protected Attributes inherited from MoreMountains.Feedbacks.MMShaker | |
float | _shakeStartedTimestamp |
float | _remappedTimeSinceStart |
bool | _resetShakerValuesAfterShake |
bool | _resetTargetValuesAfterShake |
Add this to an audio echo filter to shake its values remapped along a curve
|
protectedvirtual |
Collects initial values on the target
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
protectedvirtual |
On init we initialize our values
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
virtual |
When we get the appropriate event, we trigger a shake
echoCurve | |
duration | |
amplitude | |
relativeEcho | |
attenuation | |
channel |
|
protectedvirtual |
When that shaker gets added, we initialize its shake duration
|
protectedvirtual |
Resets the shaker's values
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
protectedvirtual |
Resets the target's values
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
protectedvirtual |
Shakes values over time
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
virtual |
Starts listening for events
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
virtual |
Stops listening for events
Reimplemented from MoreMountains.Feedbacks.MMShaker.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the audio source to pilot
bool MoreMountains.Feedbacks.MMAudioFilterEchoShaker.RelativeEcho = false |
whether or not to add to the initial value
float MoreMountains.Feedbacks.MMAudioFilterEchoShaker.RemapEchoOne = 1f |
the value to remap the curve's 1 to
float MoreMountains.Feedbacks.MMAudioFilterEchoShaker.RemapEchoZero = 0f |
the value to remap the curve's 0 to
AnimationCurve MoreMountains.Feedbacks.MMAudioFilterEchoShaker.ShakeEcho = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0)) |
the curve used to animate the intensity value on