qc.Sound

inherit qc.Node

Description

A representation of audio.

Create a `Sound'

var sound = new qc.game.add.sound(parent);

See: qc.GameObjectFactory

Variables

Variable Name Type Description
audio qc.SoundAsset The asset of audio clip.
destroyWhenStop bool When the sound stop, destroy it.
loop bool Is the audio clip looping?
mute bool Un- / Mutes the Audio.
playOnAwake bool If set to be true, the sound will automatically start playing on awake.
volume number The volume of the audio (0.0 to 1.0).
isPlaying bool Whether is playing
isPaused bool Whether is paused

Methods

Method Description
pause Pauses playing the clip.
play Plays the clip.
fadeIn Play sound in fadein mode
resume Resumes playing the clip.
stop Stops playing the clip.
addMarker Add marker
removeMarker Remove marker

Manual

Sound