übertrag zu laptop
This commit is contained in:
@@ -5971,18 +5971,18 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
let soundManager = SoundManager.getInstance();
|
||||
let audioOptions = soundManager.get(SoundManager.CHANNELS.SOUND);
|
||||
|
||||
this.coinPromise = Promise.all([new Promise((r) => {
|
||||
setTimeout(() => {
|
||||
r(continueButton.fadeIn());
|
||||
}, 500);
|
||||
}), audioOptions.loadedPromise.catch(e => {
|
||||
console.error(e);
|
||||
}),
|
||||
this.coinPromise.then(() => {
|
||||
coinsBefore = parseInt(Helper.nonNull(localStorage.getItem("coins"), "0"));
|
||||
localStorage.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
||||
})
|
||||
]);
|
||||
this.coinPromise = this.coinPromise.then(() => {
|
||||
coinsBefore = parseInt(Helper.nonNull(localStorage.getItem("coins"), "0"));
|
||||
localStorage.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
||||
}).then(() => {
|
||||
return Promise.all([new Promise((r) => {
|
||||
setTimeout(() => {
|
||||
r(continueButton.fadeIn());
|
||||
}, 500);
|
||||
}), audioOptions.loadedPromise.catch(e => {
|
||||
console.error(e);
|
||||
})]);
|
||||
});
|
||||
|
||||
this.wonParams.aborted = false;
|
||||
|
||||
@@ -6003,13 +6003,18 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
this.coinAction.redraw();
|
||||
}
|
||||
}, timeout / 2);
|
||||
setTimeout(r, timeout);
|
||||
}
|
||||
else {
|
||||
r();
|
||||
}
|
||||
//Always do the next promise for garbage collection
|
||||
setTimeout(r, timeout);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.coinPromise = this.coinPromise.catch((e) => {console.error(e);});
|
||||
|
||||
this.wonTextScaler();
|
||||
this.continueButtonScaler();
|
||||
this.levelScaler();
|
||||
|
||||
Reference in New Issue
Block a user