C# Class geek.GameEngine.Sound.SoundEffectInfo

The info about a known sound effect.
Mostra file Open project: impworks/xna.geek.engine Class Usage Examples

Public Properties

Property Type Description
AssetName string
Effect Microsoft.Xna.Framework.Audio.SoundEffect
IsLooped bool

Public Methods

Method Description
Play ( bool allowOverlap = false, float volume = 1 ) : SoundEffectInstance

Play the sound.

SoundEffectInfo ( string asset, SoundEffect eff, bool isLooped = false ) : System.Collections.Generic
Stop ( ) : void

Stop all the instances of the sound.

Private Methods

Method Description
refreshInstances ( ) : bool

Remove all finished instances from the cache.

Method Details

Play() public method

Play the sound.
public Play ( bool allowOverlap = false, float volume = 1 ) : SoundEffectInstance
allowOverlap bool Allow more than one instance of the sound played simultaneously.
volume float Volume of the sample (0..1)
return Microsoft.Xna.Framework.Audio.SoundEffectInstance

SoundEffectInfo() public method

public SoundEffectInfo ( string asset, SoundEffect eff, bool isLooped = false ) : System.Collections.Generic
asset string
eff Microsoft.Xna.Framework.Audio.SoundEffect
isLooped bool
return System.Collections.Generic

Stop() public method

Stop all the instances of the sound.
public Stop ( ) : void
return void

Property Details

AssetName public_oe property

Asset name of the effect.
public string AssetName
return string

Effect public_oe property

The effect.
public SoundEffect,Microsoft.Xna.Framework.Audio Effect
return Microsoft.Xna.Framework.Audio.SoundEffect

IsLooped public_oe property

Gets or sets looping flag.
public bool IsLooped
return bool