C# Class Nez.Audio.AudioSource

plays a collection of SoundEffects randomly and optionally with random pitch
Datei anzeigen Open project: prime31/Nez

Public Methods

Method Description
addSoundEffect ( SoundEffect effect ) : AudioSource

adds a SoundEffect to the AudioSource

createInstance ( ) : SoundEffectInstance
play ( ) : bool
play ( float volume, float pitch, float pan ) : void
setPanRange ( float min, float max ) : AudioSource

if a pan range is set every time play is called a random pan will be used

setPitchRange ( float min, float max ) : AudioSource

if a pitch range is set every time play is called a random pitch will be used

Method Details

addSoundEffect() public method

adds a SoundEffect to the AudioSource
public addSoundEffect ( SoundEffect effect ) : AudioSource
effect Microsoft.Xna.Framework.Audio.SoundEffect Effect.
return AudioSource

createInstance() public method

public createInstance ( ) : SoundEffectInstance
return Microsoft.Xna.Framework.Audio.SoundEffectInstance

play() public method

public play ( ) : bool
return bool

play() public method

public play ( float volume, float pitch, float pan ) : void
volume float
pitch float
pan float
return void

setPanRange() public method

if a pan range is set every time play is called a random pan will be used
public setPanRange ( float min, float max ) : AudioSource
min float Minimum.
max float Max.
return AudioSource

setPitchRange() public method

if a pitch range is set every time play is called a random pitch will be used
public setPitchRange ( float min, float max ) : AudioSource
min float Minimum.
max float Max.
return AudioSource