C# Класс Zeplin.Sound

Very basic wrapper for XNA's sound library.
Does not support any type besides SoundEffect right now.
Показать файл Открыть проект

Открытые методы

Метод Описание
Pause ( ) : void

Pauses the sound.

Play ( ) : void

Plays this sound unless it is already playing.

Play ( float volume, float pitch, float pan, bool loop ) : void

Plays this sound unless it is already playing.

PlayWithoutChecking ( ) : void

Plays this sound even if it is already playing.

A sound played in this way cannot be paused or stopped or otherwise manipulated.

Sound ( string resourceName ) : System

Constructs a Sound object from the specified resource string

Stop ( bool immediate ) : void

Stops the sound.

Описание методов

Pause() публичный Метод

Pauses the sound.
public Pause ( ) : void
Результат void

Play() публичный Метод

Plays this sound unless it is already playing.
public Play ( ) : void
Результат void

Play() публичный Метод

Plays this sound unless it is already playing.
public Play ( float volume, float pitch, float pan, bool loop ) : void
volume float The volume of the sound. Valid values are between 0.0 (silent) and 1.0 (full).
pitch float Pitch adjustment, ranging from -1.0 (one octave down) to 1.0 (one octave up). 0.0 is
pan float Panning, ranging from -1.0 (full left) to 1.0 (full right). 0.0 is centered.
loop bool Whether to continue playing the song indefinitely, until stopped or paused manually, or set to no longer loop.
Результат void

PlayWithoutChecking() публичный Метод

Plays this sound even if it is already playing.
A sound played in this way cannot be paused or stopped or otherwise manipulated.
public PlayWithoutChecking ( ) : void
Результат void

Sound() публичный Метод

Constructs a Sound object from the specified resource string
public Sound ( string resourceName ) : System
resourceName string The name of a SoundEffect resource
Результат System

Stop() публичный Метод

Stops the sound.
public Stop ( bool immediate ) : void
immediate bool Specifies whether to stop playing immediately, or to continue playing until the end of the sound.
Результат void