Added NoAudioSound class constructor docs

This commit is contained in:
Pavle Goloskokovic 2018-01-26 14:51:34 +01:00
parent 5c3ad36ec3
commit 1835217d7e

View file

@ -2,8 +2,25 @@ var Class = require('../../utils/Class');
var EventEmitter = require('eventemitter3');
var Extend = require('../../utils/object/Extend');
var BaseSound = require('../BaseSound');
/*!
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
*/
var NoAudioSound = new Class({
Extends: EventEmitter,
/**
* No audio implementation of the sound. It is used if audio has been
* disabled in the game config or the device doesn't support any audio.
*
* It represents a graceful degradation of sound logic that provides
* minimal functionality and prevents Phaser projects that use audio from
* breaking on devices that don't support any audio playback technologies.
*
* @class Phaser.Sound.NoAudioSound
* @constructor
* @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.
* @param {string} key - Asset key for the sound.
* @param {ISoundConfig} [config={}] - An optional config object containing default sound settings.
*/
initialize: function NoAudioSound(manager, key, config) {
EventEmitter.call(this);
this.manager = manager;