Torque3D Documentation / _generateds / SFXFadeModifier

SFXFadeModifier

Engine/source/sfx/sfxModifier.h

A volume fade effect (fade-in or fade-out).

More...

Public Types

enum
EOnEnd {
  ON_END_Nop 
  ON_END_Stop 
  ON_END_Pause 
}

Protected Attributes

Current volume level.

Volume when ending fade.

Action to perform when the fade has been completed. Defaults to no action.

Volume when beginning fade. Set when effect is activated.

Protected Functions

Called when the play cursor passes mEndTime.

Called when the play cursor passes mStartTime.

Called on each update() while the play cursor is in range.

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.

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()