Свойство | Тип | Описание | |
---|---|---|---|
PauseMusicVolumeBackup | float |
Метод | Описание | |
---|---|---|
AudioManager ( Microsoft.Xna.Framework.Game game ) : System |
Creates a new Audio Manager.
|
|
FadeSong ( float targetVolume, System.TimeSpan duration ) : void |
Smoothly transition between two volumes.
|
|
LoadSong ( string songName ) : void |
Load a Song
|
|
LoadSong ( string songName, string songPath ) : void |
Loads a Song
|
|
LoadSound ( string soundName, string soundPath ) : void |
Loads a SoundEffect
|
|
PauseSong ( ) : void |
Pauses the currently playing song. This is a no-op if the song is already paused, or if no song is currently playing.
|
|
PlaySound ( string soundType ) : void |
Plays the sound of the given name
|
|
PlaySound ( string soundType, float volume ) : void |
Plays the sound of the given name at the given volume
|
|
PlaySound ( string soundName, float volume, float pitch, float pan ) : void |
Plays the sound of the given name with parameters
|
|
ResumeSong ( ) : void |
Resumes the currently paused song. This is a no-op if the song is not paused, or if no song is currently playing.
|
|
SongPlay ( string songName ) : void |
Starts playing the song with the given name. If it is already playing, this method does nothing. If another song is currently playing, it is stopped first.
|
|
SongPlay ( string songName, bool loop ) : void |
Starts playing the song with the given name. If it is already playing, this method does nothing. If another song is currently playing, it is stopped first.
|
|
StopAllSounds ( ) : void |
Stops all currently playing sounds.
|
|
StopSong ( ) : void |
Stops the currently playing song. This is a no-op if no song is currently playing.
|
|
Update ( |
Called per loop unless Enabled is set to false.
|
Метод | Описание | |
---|---|---|
OnEnabledChanged ( object sender, |
Метод | Описание | |
---|---|---|
GetAvailableSoundIndex ( ) : int |
public AudioManager ( Microsoft.Xna.Framework.Game game ) : System | ||
game | Microsoft.Xna.Framework.Game | The Game |
Результат | System |
public FadeSong ( float targetVolume, System.TimeSpan duration ) : void | ||
targetVolume | float | Target volume, 0.0f to 1.0f |
duration | System.TimeSpan | Length of volume transition |
Результат | void |
public LoadSong ( string songName ) : void | ||
songName | string | Name of the song to load |
Результат | void |
public LoadSong ( string songName, string songPath ) : void | ||
songName | string | Name of the song |
songPath | string | Path to the song |
Результат | void |
public LoadSound ( string soundName, string soundPath ) : void | ||
soundName | string | Name of the sound to load |
soundPath | string | Path to the song asset file |
Результат | void |
protected OnEnabledChanged ( object sender, |
||
sender | object | |
args | ||
Результат | void |
public PlaySound ( string soundType ) : void | ||
soundType | string | |
Результат | void |
public PlaySound ( string soundType, float volume ) : void | ||
soundType | string | |
volume | float | Volume, 0.0f to 1.0f |
Результат | void |
public PlaySound ( string soundName, float volume, float pitch, float pan ) : void | ||
soundName | string | Name of the sound |
volume | float | Volume, 0.0f to 1.0f |
pitch | float | Pitch, -1.0f (down one octave) to 1.0f (up one octave) |
pan | float | Pan, -1.0f (full left) to 1.0f (full right) |
Результат | void |
public SongPlay ( string songName ) : void | ||
songName | string | Name of the song to play |
Результат | void |
public SongPlay ( string songName, bool loop ) : void | ||
songName | string | Name of the song to play |
loop | bool | True if song should loop, false otherwise |
Результат | void |
public Update ( |
||
gameTime | Time elapsed since last frame | |
Результат | void |