/** выстрелы не заблокированы, * (введен дополнительный идентификатор [nothing-shoot], потому, * что dont-shoot используется многими модулями */ function canShoot(e) { if ($body.classList.contains('dont-shoot') || $body.classList.contains('nothing-shoot')) { noise(audioURI, audioIdle); } else { shoot(e); shootGun(); // document.dispatchEvent(new Event('damage')); } }
function gameOver() { noise(audioURI, audioSprite.health_death); clearTimeout(healthNoticeTimerID); $healthGameOver.style.animationName = 'health-notice-game-over'; }
function regeneration() { healthAnimation($healthRegeneration, 'health-notice-regeneration'); noise(audioURI, audioHeal); }
function damage() { healthAnimation($healthDamage, 'health-notice-damage'); noise(audioURI, audioHeartBeat); noise(audioURI, audioDamage); }