Added rate event docs

This commit is contained in:
Pavle Goloskokovic 2018-01-26 14:54:15 +01:00
parent 754c3bc543
commit 371deefbcd

View file

@ -409,6 +409,11 @@ Object.defineProperty(BaseSound.prototype, 'rate', {
set: function (value) { set: function (value) {
this.currentConfig.rate = value; this.currentConfig.rate = value;
this.setRate(); this.setRate();
/**
* @event Phaser.Sound.BaseSound#rate
* @param {Phaser.Sound.BaseSound} sound - Reference to the sound that emitted event.
* @param {number} value - An updated value of Phaser.Sound.BaseSound#rate property.
*/
this.emit('rate', this, value); this.emit('rate', this, value);
} }
}); });