feat: docker stuff

This commit is contained in:
2025-07-12 14:21:31 +02:00
parent 5361076f41
commit 65101bd3fa
11 changed files with 47 additions and 0 deletions

View File

@ -195,6 +195,18 @@
highScore: localStorage.getItem('zombieHighScore') || 0
};
// Audio loader
const sounds = {
gunshot: new Audio('386845__morganpurkis__single-gunshot-52.wav'),
zombieGrunt: new Audio('426627__mrh4hn__zombie-grunt.wav'),
playerOuch: new Audio('421877__sventhors__ouch_1.wav')
};
// Set volume levels
sounds.gunshot.volume = 0.3;
sounds.zombieGrunt.volume = 0.5;
sounds.playerOuch.volume = 0.7;
// Sprite loader
const sprites = {};
const spriteList = [
@ -669,6 +681,11 @@
}
this.lastShot = Date.now();
// Play gunshot sound
sounds.gunshot.currentTime = 0;
sounds.gunshot.play().catch(e => console.log('Audio play failed:', e));
updateUI();
}
@ -965,6 +982,10 @@
// Zombie died
game.score += 10;
// Play zombie grunt sound
sounds.zombieGrunt.currentTime = 0;
sounds.zombieGrunt.play().catch(e => console.log('Audio play failed:', e));
// Random weapon drop (increased rate)
if (Math.random() < 0.4) {
const weaponKeys = Object.keys(weaponTypes);
@ -999,6 +1020,11 @@
if (now - game.player.lastDamage > 1000) {
game.player.health -= 10;
game.player.lastDamage = now;
// Play player ouch sound
sounds.playerOuch.currentTime = 0;
sounds.playerOuch.play().catch(e => console.log('Audio play failed:', e));
updateUI();
if (game.player.health <= 0) {