Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MB2D.SoundTrigger Class Reference

Triggers a sound effect More...

Collaboration diagram for MB2D.SoundTrigger:
Collaboration graph

Public Member Functions

 SoundTrigger (SoundEffect sound)
 Initializes a new instance of the T:MB2D.SoundTrigger class using the specified SoundEffect More...
 
void Trigger ()
 Plays the sound if it's not already playing More...
 
void Cut ()
 Stops the sound if it's playing More...
 
void FadeUp ()
 Increases the sounds volume one step based on the specified FadeSpeed More...
 
void FadeDown ()
 Decreases the volume based on the specified FadeSpeed. Stops the sound once the volume reaches 0 More...
 

Properties

float FadeSpeed [get, set]
 Gets or sets the fade speed. More...
 
float MaxVolume [get, set]
 Determines the maximum volume to FadeUp More...
 
bool IsLooped [get, set]
 Gets or sets a value indicating whether this T:MB2D.SoundTrigger is looped or one-shot. More...
 

Detailed Description

Triggers a sound effect

Constructor & Destructor Documentation

§ SoundTrigger()

MB2D.SoundTrigger.SoundTrigger ( SoundEffect  sound)
inline

Initializes a new instance of the T:MB2D.SoundTrigger class using the specified SoundEffect

Parameters
soundSound to use.

Member Function Documentation

§ Cut()

void MB2D.SoundTrigger.Cut ( )
inline

Stops the sound if it's playing

Here is the caller graph for this function:

§ FadeDown()

void MB2D.SoundTrigger.FadeDown ( )
inline

Decreases the volume based on the specified FadeSpeed. Stops the sound once the volume reaches 0

Here is the caller graph for this function:

§ FadeUp()

void MB2D.SoundTrigger.FadeUp ( )
inline

Increases the sounds volume one step based on the specified FadeSpeed

Here is the caller graph for this function:

§ Trigger()

void MB2D.SoundTrigger.Trigger ( )
inline

Plays the sound if it's not already playing

Property Documentation

§ FadeSpeed

float MB2D.SoundTrigger.FadeSpeed
getset

Gets or sets the fade speed.

The fade speed.

§ IsLooped

bool MB2D.SoundTrigger.IsLooped
getset

Gets or sets a value indicating whether this T:MB2D.SoundTrigger is looped or one-shot.

true if is looped; otherwise, false.

§ MaxVolume

float MB2D.SoundTrigger.MaxVolume
getset

Determines the maximum volume to FadeUp

The max volume.


The documentation for this class was generated from the following file: