The 36-character identifier string of the Component. The id is unique within the Entity is belongs to. Currently, the same id may be used by another Component on a different Entity.
Setting the loop property causes playback of the region of the Sound defined by loopStart and loopEnd to continue indefinitely once any part of the looped region is played.
The time, in seconds, from the start of the Sound clip where the loop region ends (see loop property).
The time, in seconds, from the start of the Sound clip where the loop region starts (see loop property).
The Sound clip to play.
The type of the Component.
Gets the Entity the Component is part of. This throws an exception if the Component is not in an Entity. Use the isInEntity property to test for that.
Returns true if the Component is part of an Entity.
Returns true if the Component is part of the Game (via the Entity it belongs to).
Indicates whether the Sound clip is currently being played.
Starts playing the Sound clip from the specified time offset, in seconds. Calling start while the Sound is already playing stops current playback and starts it again at the specified offset.
The time offset, in seconds from the beginning of the Sound, at which to start playback.
Stops playing the Sound clip. Calling stop if the Sound isn't beeing played, has no effect.
If true, loop is disabled and the Sound gets played to its end. If loop was not set in the first place, stop(true) has effectively no effect.
The gain to apply to the Sound clip audio playback. The gain is a multiplying factor applied to each sample of the Sound when it is played. A value of 1 plays the Sound at its natural level while a value of 0.5 will half each sample causing the audio to appear quieter. Note that large gain values make the audio louder but eventually cause a waveform distortion called "clipping" where the result of the multiplication of the sample value with the gain "saturates" to the maximum value supported by the audio system.