mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 08:33:40 +00:00
Removed condition since it is already performed in base class constructor
This commit is contained in:
parent
a90760f8df
commit
bf0c868bf3
1 changed files with 8 additions and 10 deletions
|
@ -89,16 +89,14 @@ var WebAudioSoundManager = new Class({
|
|||
*/
|
||||
unlock: function () {
|
||||
var _this = this;
|
||||
if (this.context.state === 'suspended' && 'ontouchstart' in window) {
|
||||
var unlock_1 = function () {
|
||||
_this.context.resume().then(function () {
|
||||
document.body.removeEventListener('touchstart', unlock_1);
|
||||
document.body.removeEventListener('touchend', unlock_1);
|
||||
});
|
||||
};
|
||||
document.body.addEventListener('touchstart', unlock_1, false);
|
||||
document.body.addEventListener('touchend', unlock_1, false);
|
||||
}
|
||||
var unlock = function () {
|
||||
_this.context.resume().then(function () {
|
||||
document.body.removeEventListener('touchstart', unlock);
|
||||
document.body.removeEventListener('touchend', unlock);
|
||||
});
|
||||
};
|
||||
document.body.addEventListener('touchstart', unlock, false);
|
||||
document.body.addEventListener('touchend', unlock, false);
|
||||
},
|
||||
/**
|
||||
* Method used internally for pausing sound manager if
|
||||
|
|
Loading…
Reference in a new issue