C# Class fliXNA_xbox.FlxSound

Inheritance: FlxBasic
显示文件 Open project: konamicode/fliXNA_xbox Class Usage Examples

Public Properties

Property Type Description
amplitude float
amplitudeLeft float
amplitudeRight float
artist string
autoDestroy bool
name string
survive bool
x float
y float

Protected Properties

Property Type Description
_fadeInTimer float
_fadeInTotal float
_fadeOutTimer float
_fadeOutTotal float
_followTarget bool
_looped bool
_pan bool
_pauseOnFadeOut bool
_position float
_radius float
_sound Microsoft.Xna.Framework.Audio.SoundEffectInstance
_source FlxObject
_target FlxObject
_volume float
_volumeAdjust float
playCount int
proximitized bool

Public Methods

Method Description
FlxSound ( ) : System

FlxSound constructor gets all the variables initialized, but NOT ready to play a sound yet.

destroy ( ) : void
fadeIn ( float Seconds ) : void
fadeOut ( float Seconds, bool PauseInstead = false ) : void
getActualVolume ( ) : float
loadEmbedded ( SoundEffect EmbeddedSound, bool Looped = false, bool AutoDestroy = false ) : FlxSound
pause ( ) : void
play ( bool ForceRestart = false ) : void
proximity ( FlxObject Source, FlxObject Target, float Radius ) : FlxSound
resume ( ) : void
stop ( ) : void
update ( ) : void

Protected Methods

Method Description
createSound ( ) : void

Private Methods

Method Description
updateTransform ( ) : void

Method Details

FlxSound() public method

FlxSound constructor gets all the variables initialized, but NOT ready to play a sound yet.
public FlxSound ( ) : System
return System

createSound() protected method

protected createSound ( ) : void
return void

destroy() public method

public destroy ( ) : void
return void

fadeIn() public method

public fadeIn ( float Seconds ) : void
Seconds float
return void

fadeOut() public method

public fadeOut ( float Seconds, bool PauseInstead = false ) : void
Seconds float
PauseInstead bool
return void

getActualVolume() public method

public getActualVolume ( ) : float
return float

loadEmbedded() public method

public loadEmbedded ( SoundEffect EmbeddedSound, bool Looped = false, bool AutoDestroy = false ) : FlxSound
EmbeddedSound Microsoft.Xna.Framework.Audio.SoundEffect
Looped bool
AutoDestroy bool
return FlxSound

pause() public method

public pause ( ) : void
return void

play() public method

public play ( bool ForceRestart = false ) : void
ForceRestart bool
return void

proximity() public method

public proximity ( FlxObject Source, FlxObject Target, float Radius ) : FlxSound
Source FlxObject
Target FlxObject
Radius float
return FlxSound

resume() public method

public resume ( ) : void
return void

stop() public method

public stop ( ) : void
return void

update() public method

public update ( ) : void
return void

Property Details

_fadeInTimer protected_oe property

Internal timer for fading in the sound playback.
protected float _fadeInTimer
return float

_fadeInTotal protected_oe property

Internal helper for fading in sounds.
protected float _fadeInTotal
return float

_fadeOutTimer protected_oe property

Internal tracker used to keep track of requests to fade out the sound playback
protected float _fadeOutTimer
return float

_fadeOutTotal protected_oe property

Internal helper for fading out sounds
protected float _fadeOutTotal
return float

_followTarget protected_oe property

Internal helper for sound proximity. The sound will maintain the same position as the target if true.
protected bool _followTarget
return bool

_looped protected_oe property

Internal tracker for whether the sound is looping or not
protected bool _looped
return bool

_pan protected_oe property

Internal tracker for whether to pan the sound left and right. Defualt is false
protected bool _pan
return bool

_pauseOnFadeOut protected_oe property

Internal flag for whether to pause or stop the sound when its done fading out
protected bool _pauseOnFadeOut
return bool

_position protected_oe property

Internal tracker for the position in runtime of the sound playback
protected float _position
return float

_radius protected_oe property

Internal tracker for maximum effective radius of this sound.
protected float _radius
return float

_sound protected_oe property

Internal tracker for the sound object
protected SoundEffectInstance,Microsoft.Xna.Framework.Audio _sound
return Microsoft.Xna.Framework.Audio.SoundEffectInstance

_source protected_oe property

Internal tracker for sound's source - for proximity and panning
protected FlxObject,fliXNA_xbox _source
return FlxObject

_target protected_oe property

Internal tracker for sound's target - for proximity and panning
protected FlxObject,fliXNA_xbox _target
return FlxObject

_volume protected_oe property

Internal tracker for the volume of the sound
protected float _volume
return float

_volumeAdjust protected_oe property

Internal tracker for total volume adjustment
protected float _volumeAdjust
return float

amplitude public_oe property

Stores the average wave amplitude of both stereo channels
public float amplitude
return float

amplitudeLeft public_oe property

Amplitude of left stereo channel
public float amplitudeLeft
return float

amplitudeRight public_oe property

Amplitude of right stereo channel
public float amplitudeRight
return float

artist public_oe property

public string artist
return string

autoDestroy public_oe property

Whether to call destroy() when the sound has finished
public bool autoDestroy
return bool

name public_oe property

public string name
return string

playCount protected_oe property

protected int playCount
return int

proximitized protected_oe property

Internal tracker to help with proximity
protected bool proximitized
return bool

survive public_oe property

Whether or not this sound should be automatically destroyed when you switch states
public bool survive
return bool

x public_oe property

X position of this sound in world coordinates. Only matters if you're doing proximity/panning
public float x
return float

y public_oe property

Y position of this sound in world coordinates. Only matters if you're doing proximity/panning
public float y
return float