An open API service indexing awesome lists of open source software.

https://github.com/netgfx/Phaser-SoundManager

A small sound-manager for easily use and parse sounds from assetPacks
https://github.com/netgfx/Phaser-SoundManager

Last synced: 7 months ago
JSON representation

A small sound-manager for easily use and parse sounds from assetPacks

Awesome Lists containing this project

README

          

# Phaser-SoundManager
A small sound-manager for easily use and parse sounds from assetPacks

View the *files.json* file for an example of the assetPack, then instansiate the sound-manager like this:
```
var soundManager = new SoundManager(gameObject);
soundManager.setupSounds(); // initialize
```

And call functions like:
```
soundManager.playSound("somesound");
or
soundManager.somesound();

// Stop Sound
soundManager.stopSound("mainSong");

// play sound with loop, and volume parameters
soundManager.playSound("mainMenu", true, 0.5);
```

## API

* playSound(key)
* soundkeyname()
* stopSound(key)
* playSound(key, loop, volume)
* stopAllSounds()
* getSound(key) // returns the sound object