diff options
author | Minteck <contact@minteck.org> | 2022-05-18 18:50:12 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-05-18 18:50:12 +0200 |
commit | 0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0 (patch) | |
tree | 97a7e15187fe7fcb5b8775e03a62f62ac8fc5c61 /kartik/sfx | |
parent | d4805039b8ea7b30f5e78cf53caf8fd3f267256a (diff) | |
download | arcade-trunk.tar.gz arcade-trunk.tar.bz2 arcade-trunk.zip |
Diffstat (limited to 'kartik/sfx')
-rwxr-xr-x | kartik/sfx/click.mp3 | bin | 0 -> 8641 bytes | |||
-rwxr-xr-x | kartik/sfx/crash.mp3 | bin | 0 -> 13194 bytes | |||
-rwxr-xr-x | kartik/sfx/gamecrash.wav | bin | 0 -> 51846 bytes | |||
-rwxr-xr-x | kartik/sfx/intro.mp3 | bin | 0 -> 106606 bytes | |||
-rwxr-xr-x | kartik/sfx/last.mp3 | bin | 0 -> 26670 bytes | |||
-rwxr-xr-x | kartik/sfx/menu.mp3 | bin | 0 -> 7561 bytes | |||
-rwxr-xr-x | kartik/sfx/newintro.mp3 | bin | 0 -> 47762 bytes | |||
-rwxr-xr-x | kartik/sfx/notification.mp3 | bin | 0 -> 11425 bytes | |||
-rwxr-xr-x | kartik/sfx/pass.mp3 | bin | 0 -> 22309 bytes | |||
-rwxr-xr-x | kartik/sfx/pause.mp3 | bin | 0 -> 14353 bytes | |||
-rwxr-xr-x | kartik/sfx/sfx.js | 60 | ||||
-rwxr-xr-x | kartik/sfx/win.mp3 | bin | 0 -> 24337 bytes |
12 files changed, 60 insertions, 0 deletions
diff --git a/kartik/sfx/click.mp3 b/kartik/sfx/click.mp3 Binary files differnew file mode 100755 index 0000000..20feda0 --- /dev/null +++ b/kartik/sfx/click.mp3 diff --git a/kartik/sfx/crash.mp3 b/kartik/sfx/crash.mp3 Binary files differnew file mode 100755 index 0000000..c68bb1f --- /dev/null +++ b/kartik/sfx/crash.mp3 diff --git a/kartik/sfx/gamecrash.wav b/kartik/sfx/gamecrash.wav Binary files differnew file mode 100755 index 0000000..4f42092 --- /dev/null +++ b/kartik/sfx/gamecrash.wav diff --git a/kartik/sfx/intro.mp3 b/kartik/sfx/intro.mp3 Binary files differnew file mode 100755 index 0000000..39eeae8 --- /dev/null +++ b/kartik/sfx/intro.mp3 diff --git a/kartik/sfx/last.mp3 b/kartik/sfx/last.mp3 Binary files differnew file mode 100755 index 0000000..ff00ddf --- /dev/null +++ b/kartik/sfx/last.mp3 diff --git a/kartik/sfx/menu.mp3 b/kartik/sfx/menu.mp3 Binary files differnew file mode 100755 index 0000000..626a82e --- /dev/null +++ b/kartik/sfx/menu.mp3 diff --git a/kartik/sfx/newintro.mp3 b/kartik/sfx/newintro.mp3 Binary files differnew file mode 100755 index 0000000..b209f4d --- /dev/null +++ b/kartik/sfx/newintro.mp3 diff --git a/kartik/sfx/notification.mp3 b/kartik/sfx/notification.mp3 Binary files differnew file mode 100755 index 0000000..09f548a --- /dev/null +++ b/kartik/sfx/notification.mp3 diff --git a/kartik/sfx/pass.mp3 b/kartik/sfx/pass.mp3 Binary files differnew file mode 100755 index 0000000..e4fc004 --- /dev/null +++ b/kartik/sfx/pass.mp3 diff --git a/kartik/sfx/pause.mp3 b/kartik/sfx/pause.mp3 Binary files differnew file mode 100755 index 0000000..76d0634 --- /dev/null +++ b/kartik/sfx/pause.mp3 diff --git a/kartik/sfx/sfx.js b/kartik/sfx/sfx.js new file mode 100755 index 0000000..9ed6418 --- /dev/null +++ b/kartik/sfx/sfx.js @@ -0,0 +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) {} +}, 200)
\ No newline at end of file diff --git a/kartik/sfx/win.mp3 b/kartik/sfx/win.mp3 Binary files differnew file mode 100755 index 0000000..d3c3b89 --- /dev/null +++ b/kartik/sfx/win.mp3 |