View source
class flaxen.component.Sound implements Completable
Available on all platforms
Basic sound component.
Add this to an entity to play a sound file.
If this component is removed or the entity is destroyed, the sound will be stopped.
The AudioSystem
creates a corresponding Audio
component for storing the
associated OpenFL SoundChannel.
Instance Fields
function new(file:String, ?loop:Bool = false, ?volume:Float = 1, ?pan:Float = 0, ?offset:Float = 0):Void