C# Class geek.GameEngine.Sound.SoundEffectInfo

The info about a known sound effect.
Afficher le fichier Open project: impworks/xna.geek.engine Class Usage Examples

Méthodes publiques

Свойство Type Description
AssetName string
Effect Microsoft.Xna.Framework.Audio.SoundEffect
IsLooped bool

Méthodes publiques

Méthode 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

Méthode Description
refreshInstances ( ) : bool

Remove all finished instances from the cache.

Method Details

Play() public méthode

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)
Résultat Microsoft.Xna.Framework.Audio.SoundEffectInstance

SoundEffectInfo() public méthode

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

Stop() public méthode

Stop all the instances of the sound.
public Stop ( ) : void
Résultat void

Property Details

AssetName public_oe property

Asset name of the effect.
public string AssetName
Résultat string

Effect public_oe property

The effect.
public SoundEffect,Microsoft.Xna.Framework.Audio Effect
Résultat Microsoft.Xna.Framework.Audio.SoundEffect

IsLooped public_oe property

Gets or sets looping flag.
public bool IsLooped
Résultat bool