diff options
Diffstat (limited to 'sfx')
-rw-r--r-- | sfx/click.mp3 | bin | 4461 -> 8641 bytes | |||
-rw-r--r-- | sfx/crash.mp3 | bin | 9453 -> 13194 bytes | |||
-rw-r--r-- | sfx/gamecrash.wav | bin | 0 -> 51846 bytes | |||
-rw-r--r-- | sfx/intro.mp3 | bin | 9026 -> 106606 bytes | |||
-rw-r--r-- | sfx/last.mp3 | bin | 8168 -> 26670 bytes | |||
-rw-r--r-- | sfx/menu.mp3 | bin | 5037 -> 7561 bytes | |||
-rw-r--r-- | sfx/notification.mp3 | bin | 0 -> 11425 bytes | |||
-rw-r--r-- | sfx/pass.mp3 | bin | 10884 -> 22309 bytes | |||
-rw-r--r-- | sfx/pause.mp3 | bin | 11565 -> 14353 bytes | |||
-rw-r--r-- | sfx/sfx.js | 118 | ||||
-rw-r--r-- | sfx/win.mp3 | bin | 3361 -> 24337 bytes |
11 files changed, 59 insertions, 59 deletions
diff --git a/sfx/click.mp3 b/sfx/click.mp3 Binary files differindex 710c85b..20feda0 100644 --- a/sfx/click.mp3 +++ b/sfx/click.mp3 diff --git a/sfx/crash.mp3 b/sfx/crash.mp3 Binary files differindex 1ce02e9..c68bb1f 100644 --- a/sfx/crash.mp3 +++ b/sfx/crash.mp3 diff --git a/sfx/gamecrash.wav b/sfx/gamecrash.wav Binary files differnew file mode 100644 index 0000000..4f42092 --- /dev/null +++ b/sfx/gamecrash.wav diff --git a/sfx/intro.mp3 b/sfx/intro.mp3 Binary files differindex 5d90f31..39eeae8 100644 --- a/sfx/intro.mp3 +++ b/sfx/intro.mp3 diff --git a/sfx/last.mp3 b/sfx/last.mp3 Binary files differindex 2595f73..ff00ddf 100644 --- a/sfx/last.mp3 +++ b/sfx/last.mp3 diff --git a/sfx/menu.mp3 b/sfx/menu.mp3 Binary files differindex f48daa8..626a82e 100644 --- a/sfx/menu.mp3 +++ b/sfx/menu.mp3 diff --git a/sfx/notification.mp3 b/sfx/notification.mp3 Binary files differnew file mode 100644 index 0000000..09f548a --- /dev/null +++ b/sfx/notification.mp3 diff --git a/sfx/pass.mp3 b/sfx/pass.mp3 Binary files differindex 04caca0..e4fc004 100644 --- a/sfx/pass.mp3 +++ b/sfx/pass.mp3 diff --git a/sfx/pause.mp3 b/sfx/pause.mp3 Binary files differindex aedcd13..76d0634 100644 --- a/sfx/pause.mp3 +++ b/sfx/pause.mp3 @@ -1,60 +1,60 @@ -const Sound = { - pass: () => { - new Audio(kresources.sfx['pass']).play() - }, - last: () => { - new Audio(kresources.sfx['last']).play() - }, - crash: () => { - new Audio(kresources.sfx['crash']).play() - }, - win: () => { - new Audio(kresources.sfx['win']).play() - }, - click: () => { - new Audio(kresources.sfx['click']).play() - }, - menu: () => { - new Audio(kresources.sfx['menu']).play() - }, - pause: () => { - new Audio(kresources.sfx['pause']).play() - }, - start: () => { - new Audio(kresources.sfx['start']).play() - }, - intro: () => { - new Audio(kresources.music['start'].file).play() - }, -} - -shouldMusicPlay = true; - -setInterval(() => { - try { - if (typeof document.getElementById('music') !== "undefined" && typeof document.getElementById('music') !== "null") { - if (shouldMusicPlay) { - document.getElementById('music').play(); - } - if (!shouldMusicPlay) { - document.getElementById('music').pause(); - } - } - if (typeof b !== "undefined" && typeof b !== "null") { - if (shouldMusicPlay) { - b.play(); - } - if (!shouldMusicPlay) { - b.pause(); - } - } - if (typeof me !== "undefined" && typeof me !== "null") { - if (me.currentTime < me.duration) { - me.play(); - } - if (me.currentTime >= me.duration) { - me.pause(); - } - } - } catch (e) {} +const Sound = {
+ pass: () => {
+ new Audio(kresources.sfx['pass']).play()
+ },
+ last: () => {
+ new Audio(kresources.sfx['last']).play()
+ },
+ crash: () => {
+ new Audio(kresources.sfx['crash']).play()
+ },
+ win: () => {
+ new Audio(kresources.sfx['win']).play()
+ },
+ click: () => {
+ new Audio(kresources.sfx['click']).play()
+ },
+ menu: () => {
+ new Audio(kresources.sfx['menu']).play()
+ },
+ pause: () => {
+ new Audio(kresources.sfx['pause']).play()
+ },
+ start: () => {
+ new Audio(kresources.sfx['start']).play()
+ },
+ intro: () => {
+ new Audio(kresources.music['start'].file).play()
+ },
+}
+
+shouldMusicPlay = true;
+
+setInterval(() => {
+ try {
+ if (typeof document.getElementById('music') !== "undefined" && typeof document.getElementById('music') !== "null") {
+ if (shouldMusicPlay) {
+ document.getElementById('music').play();
+ }
+ if (!shouldMusicPlay) {
+ document.getElementById('music').pause();
+ }
+ }
+ if (typeof b !== "undefined" && typeof b !== "null") {
+ if (shouldMusicPlay) {
+ b.play();
+ }
+ if (!shouldMusicPlay) {
+ b.pause();
+ }
+ }
+ if (typeof me !== "undefined" && typeof me !== "null") {
+ if (me.currentTime < me.duration) {
+ me.play();
+ }
+ if (me.currentTime >= me.duration) {
+ me.pause();
+ }
+ }
+ } catch (e) {}
}, 200)
\ No newline at end of file diff --git a/sfx/win.mp3 b/sfx/win.mp3 Binary files differindex 9a7ae56..d3c3b89 100644 --- a/sfx/win.mp3 +++ b/sfx/win.mp3 |