From 0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 18 May 2022 18:50:12 +0200 Subject: Add Kartik --- kartik/sfx/click.mp3 | Bin 0 -> 8641 bytes kartik/sfx/crash.mp3 | Bin 0 -> 13194 bytes kartik/sfx/gamecrash.wav | Bin 0 -> 51846 bytes kartik/sfx/intro.mp3 | Bin 0 -> 106606 bytes kartik/sfx/last.mp3 | Bin 0 -> 26670 bytes kartik/sfx/menu.mp3 | Bin 0 -> 7561 bytes kartik/sfx/newintro.mp3 | Bin 0 -> 47762 bytes kartik/sfx/notification.mp3 | Bin 0 -> 11425 bytes kartik/sfx/pass.mp3 | Bin 0 -> 22309 bytes kartik/sfx/pause.mp3 | Bin 0 -> 14353 bytes kartik/sfx/sfx.js | 60 ++++++++++++++++++++++++++++++++++++++++++++ kartik/sfx/win.mp3 | Bin 0 -> 24337 bytes 12 files changed, 60 insertions(+) create mode 100755 kartik/sfx/click.mp3 create mode 100755 kartik/sfx/crash.mp3 create mode 100755 kartik/sfx/gamecrash.wav create mode 100755 kartik/sfx/intro.mp3 create mode 100755 kartik/sfx/last.mp3 create mode 100755 kartik/sfx/menu.mp3 create mode 100755 kartik/sfx/newintro.mp3 create mode 100755 kartik/sfx/notification.mp3 create mode 100755 kartik/sfx/pass.mp3 create mode 100755 kartik/sfx/pause.mp3 create mode 100755 kartik/sfx/sfx.js create mode 100755 kartik/sfx/win.mp3 (limited to 'kartik/sfx') diff --git a/kartik/sfx/click.mp3 b/kartik/sfx/click.mp3 new file mode 100755 index 0000000..20feda0 Binary files /dev/null and b/kartik/sfx/click.mp3 differ diff --git a/kartik/sfx/crash.mp3 b/kartik/sfx/crash.mp3 new file mode 100755 index 0000000..c68bb1f Binary files /dev/null and b/kartik/sfx/crash.mp3 differ diff --git a/kartik/sfx/gamecrash.wav b/kartik/sfx/gamecrash.wav new file mode 100755 index 0000000..4f42092 Binary files /dev/null and b/kartik/sfx/gamecrash.wav differ diff --git a/kartik/sfx/intro.mp3 b/kartik/sfx/intro.mp3 new file mode 100755 index 0000000..39eeae8 Binary files /dev/null and b/kartik/sfx/intro.mp3 differ diff --git a/kartik/sfx/last.mp3 b/kartik/sfx/last.mp3 new file mode 100755 index 0000000..ff00ddf Binary files /dev/null and b/kartik/sfx/last.mp3 differ diff --git a/kartik/sfx/menu.mp3 b/kartik/sfx/menu.mp3 new file mode 100755 index 0000000..626a82e Binary files /dev/null and b/kartik/sfx/menu.mp3 differ diff --git a/kartik/sfx/newintro.mp3 b/kartik/sfx/newintro.mp3 new file mode 100755 index 0000000..b209f4d Binary files /dev/null and b/kartik/sfx/newintro.mp3 differ diff --git a/kartik/sfx/notification.mp3 b/kartik/sfx/notification.mp3 new file mode 100755 index 0000000..09f548a Binary files /dev/null and b/kartik/sfx/notification.mp3 differ diff --git a/kartik/sfx/pass.mp3 b/kartik/sfx/pass.mp3 new file mode 100755 index 0000000..e4fc004 Binary files /dev/null and b/kartik/sfx/pass.mp3 differ diff --git a/kartik/sfx/pause.mp3 b/kartik/sfx/pause.mp3 new file mode 100755 index 0000000..76d0634 Binary files /dev/null and b/kartik/sfx/pause.mp3 differ 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 new file mode 100755 index 0000000..d3c3b89 Binary files /dev/null and b/kartik/sfx/win.mp3 differ -- cgit