SFXFadeModifier
Engine/source/sfx/sfxModifier.h
A volume fade effect (fade-in or fade-out).
Protected Attributes
Current volume level.
Volume when ending fade.
Volume when beginning fade. Set when effect is activated.
Protected Functions
Public Functions
Detailed Description
A volume fade effect (fade-in or fade-out).
Public Types
EOnEnd
Enumerator
- ON_END_Nop
Do nothing with source when fade is complete.
- ON_END_Stop
Stop source when fade is complete.
- ON_END_Pause
Pause source when fade is complete.
typedef SFXRangeModifier Parent
Protected Attributes
F32 mCurrentVolume
Current volume level.
F32 mEndVolume
Volume when ending fade.
EOnEnd mOnEnd
Action to perform when the fade has been completed. Defaults to no action.
F32 mStartVolume
Volume when beginning fade. Set when effect is activated.
Protected Functions
_onEnd()
Reimplemented from: SFXRangeModifier
_onStart()
Reimplemented from: SFXRangeModifier
_onUpdate()
Reimplemented from: SFXRangeModifier
Public Functions
SFXFadeModifier(SFXSource * source, F32 time, F32 endVolume, F32 startTime, EOnEnd onEndDo, bool removeWhenDone)
Create an effect that fades the volume of "source" to "endVolume" over the period of "time" seconds.
The fade will start at "referenceTime" using the source's current volume at the time as the start.
~SFXFadeModifier()