3DRadSpace  v1.0.0a
Scripting documentation
_3DRadSpaceDll.SoundEffect Class Reference

SoundEffect class. Allows loading and playing sound effects. More...

Inheritance diagram for _3DRadSpaceDll.SoundEffect:
_3DRadSpaceDll.GameObject _3DRadSpaceDll.SoundSource

Public Member Functions

 SoundEffect (string name, bool active, string resource, float volume=1.0f)
 Main constructor. More...
 
 SoundEffect ()
 Empty SoundEffect constructor. More...
 
override void Load (ContentManager content)
 Loads the sound More...
 
void Play ()
 Plays the sound. More...
 
void Pause ()
 Pauses the sound. More...
 
void Stop ()
 Stops the sound More...
 
bool IsPlaying ()
 Checks if the sound is playing. More...
 
bool IsPaused ()
 Checks if the sound is paused. More...
 
bool IsStopped ()
 Checks if the sound is stopped. More...
 
override void Trigger ()
 Plays the sound. More...
 
- Public Member Functions inherited from _3DRadSpaceDll.GameObject
 GameObject ()
 Default constructor. More...
 
void Enable ()
 Enables object. More...
 
void Disable ()
 Disables object. More...
 
void Toggle ()
 Switches object on/off state. More...
 
void Show ()
 Shows the object. More...
 
void Hide ()
 Hides the object. More...
 
virtual void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Unloads the resource. More...
 
virtual void EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Object draw code for the 3DRadSpace editor More...
 
virtual void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 Object update logic More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override int GetHashCode ()
 Returns the hash code calculated from a string representing the data inside the object. More...
 
override string ToString ()
 Returns the object's name More...
 
void RunOnce ()
 Runs the object one Update loop. If used on a active object it will be stopped. More...
 

Properties

Microsoft.Xna.Framework.Audio.SoundEffect Sound [get]
 Sound file. Use

See also
SoundInstance, Microsoft.Xna.Framework.Audio.SoundEffect

to directly access the . More...

 
SoundEffectInstance SoundInstance [get, set]
 SoundInstance object. Allows playing the sound. More...
 
float Volume [get, set]
 Sound volume. Ranges from 0.0f to 1.0f. More...
 
float Pitch [get, set]
 Sound pitch. Ranges from -1.0f to 1.0f. More...
 
float Pan [get, set]
 Pan / speaker balance. More...
 
SoundState SoundState [get, set]
 Gets or sets the current state of the sound. para>Unlike SoundInstance.State, this property can be also set.para>Setting this property to any value will call the

See also
Play, Stop, Pause

, and depinding on the value. More...

 
- Properties inherited from _3DRadSpaceDll.GameObject
string Name [get, set]
 Object Name. Used as a string identifier. More...
 
object Tag [get, set]
 Tag object. More...
 
bool Enabled [get, set]
 Checks if object is enabled. More...
 
bool Hidden [get, set]
 Checks if object is being drawn. More...
 
List< ObjectBehiavourBehiavours [get, set]
 Relation with other objects More...
 
Quaternion RotationQuaternion [get]
 Rotation in a Quaterion system. More...
 
string Resource [get, set]
 Resource file More...
 

Additional Inherited Members

- Static Public Member Functions inherited from _3DRadSpaceDll.GameObject
static implicit operator bool (GameObject o)
 Checks if the object exists. Same as GameObject != null. More...
 
static bool operator== (GameObject a, GameObject b)
 Checks if two GameObjects are equal. More...
 
static bool operator!= (GameObject a, GameObject b)
 The opposite of the equality operator. More...
 
- Public Attributes inherited from _3DRadSpaceDll.GameObject
Vector3 Position
 Object position More...
 
Vector3 Rotation
 Rotation in a Euler angles system. More...
 
List< int > SelectedObjects
 Used for editor. More...
 
- Events inherited from _3DRadSpaceDll.GameObject
onDraw OnDraw
 Called when object is being drawn on frame. More...
 
onUpdate OnUpdate
 Called when object is being updated on the update logic loop. More...
 
onObjectDestroy OnRemoval
 Called when object is being deleted. More...
 
onObjectLoad OnObjectLoad
 Called when a object resource is being loaded. More...
 

Detailed Description

SoundEffect class. Allows loading and playing sound effects.

Constructor & Destructor Documentation

◆ SoundEffect() [1/2]

_3DRadSpaceDll.SoundEffect.SoundEffect ( string  name,
bool  active,
string  resource,
float  volume = 1.0f 
)

Main constructor.

Parameters
name
active
resource
volume

◆ SoundEffect() [2/2]

_3DRadSpaceDll.SoundEffect.SoundEffect ( )

Empty SoundEffect constructor.

Member Function Documentation

◆ IsPaused()

bool _3DRadSpaceDll.SoundEffect.IsPaused ( )

Checks if the sound is paused.

Returns

◆ IsPlaying()

bool _3DRadSpaceDll.SoundEffect.IsPlaying ( )

Checks if the sound is playing.

Returns

◆ IsStopped()

bool _3DRadSpaceDll.SoundEffect.IsStopped ( )

Checks if the sound is stopped.

Returns

◆ Load()

override void _3DRadSpaceDll.SoundEffect.Load ( ContentManager  content)
virtual

Loads the sound

Parameters
content

Reimplemented from _3DRadSpaceDll.GameObject.

◆ Pause()

void _3DRadSpaceDll.SoundEffect.Pause ( )

Pauses the sound.

◆ Play()

void _3DRadSpaceDll.SoundEffect.Play ( )

Plays the sound.

◆ Stop()

void _3DRadSpaceDll.SoundEffect.Stop ( )

Stops the sound

◆ Trigger()

override void _3DRadSpaceDll.SoundEffect.Trigger ( )
virtual

Plays the sound.

Reimplemented from _3DRadSpaceDll.GameObject.

Property Documentation

◆ Pan

float _3DRadSpaceDll.SoundEffect.Pan
getset

Pan / speaker balance.

◆ Pitch

float _3DRadSpaceDll.SoundEffect.Pitch
getset

Sound pitch. Ranges from -1.0f to 1.0f.

◆ Sound

Microsoft.Xna.Framework.Audio.SoundEffect _3DRadSpaceDll.SoundEffect.Sound
get

Sound file. Use

See also
SoundInstance, Microsoft.Xna.Framework.Audio.SoundEffect

to directly access the .

◆ SoundInstance

SoundEffectInstance _3DRadSpaceDll.SoundEffect.SoundInstance
getset

SoundInstance object. Allows playing the sound.

◆ SoundState

SoundState _3DRadSpaceDll.SoundEffect.SoundState
getset

Gets or sets the current state of the sound. para>Unlike SoundInstance.State, this property can be also set.para>Setting this property to any value will call the

See also
Play, Stop, Pause

, and depinding on the value.

◆ Volume

float _3DRadSpaceDll.SoundEffect.Volume
getset

Sound volume. Ranges from 0.0f to 1.0f.