Defined detune property setter to be able to use checkTouchLocked with it

This commit is contained in:
Pavle Goloskokovic 2018-01-17 17:22:30 +01:00
parent 865f8d06ad
commit eb5be4c75d

View file

@ -335,6 +335,21 @@ Object.defineProperty(HTML5AudioSound.prototype, 'rate', {
Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').set.call(this, value);
}
});
/**
* Detuning of sound.
*
* @name Phaser.Sound.HTML5AudioSound#detune
* @property {number} detune
*/
Object.defineProperty(HTML5AudioSound.prototype, 'detune', {
set: function (value) {
this.currentConfig.detune = value;
if (this.checkTouchLocked('property', 'detune', value)) {
return;
}
Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value);
}
});
/**
* Current position of playing sound.
*