mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 16:43:30 +00:00
Defined detune property setter to be able to use checkTouchLocked with it
This commit is contained in:
parent
865f8d06ad
commit
eb5be4c75d
1 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue