1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Initial support for themes, sound improvements

This commit is contained in:
tobspr
2020-05-16 09:49:00 +02:00
parent 236859baa1
commit 7870f011b8
20 changed files with 137 additions and 41 deletions

View File

@@ -74,10 +74,17 @@ class MusicInstance extends MusicInstanceInterface {
autoplay: false,
loop: true,
html5: true,
volume: 0.3,
volume: 1,
preload: true,
pool: 2,
onunlock: () => {
if (this.playing) {
logger.log("Playing music after manual unlock");
this.play();
}
},
onload: () => {
resolve();
},

View File

@@ -18,6 +18,7 @@ export const SOUNDS = {
dialogOk: "ui/dialog_ok.mp3",
swishHide: "ui/ui_swish_hide.mp3",
swishShow: "ui/ui_swish_show.mp3",
badgeNotification: "ui/badge_notification.mp3",
levelComplete: "ui/level_complete.mp3",
@@ -27,6 +28,7 @@ export const SOUNDS = {
export const MUSIC = {
theme: "theme.mp3",
menu: "menu.mp3",
};
export class SoundInstanceInterface {