A way of grouping sounds for things such as collective volume control

Constructor

@:value({ volume : 1 })new(volume:Float = 1)

Create a new sound group

Parameters:

volume

The initial volume of this group

Variables

@:value([])sounds:Array<FlxSound> = []

The sounds in this group

volume:Float

The volume of this group

Methods

add(sound:FlxSound):Bool

Add a sound to this group

Parameters:

sound

The sound to add to this group

Returns:

True if sound was successfully added, false otherwise

pause():Void

Call this function to pause all sounds in this group.

Available since

4.3.0

.

remove(sound:FlxSound):Bool

Remove a sound from this group

Parameters:

sound

The sound to remove

Returns:

True if sound was successfully removed, false otherwise

resume():Void

Unpauses all sounds in this group. Only works on sounds that have been paused.

Available since

4.3.0

.