implement sounds

This commit is contained in:
LabyStudio
2022-02-13 07:55:40 +01:00
parent 82ea74085b
commit c955fdc7f9
42 changed files with 209 additions and 2 deletions
@@ -62,6 +62,11 @@ window.GameWindow = class {
// Mouse buttons
document.addEventListener('click', function (event) {
// Create sound engine (It has to be created after user interaction)
if(!minecraft.soundManager.isCreated()) {
minecraft.soundManager.create(minecraft.worldRenderer);
}
// Handle in-game mouse click
minecraft.onMouseClicked(event.button);