Example #1
0
/** выстрелы не заблокированы,
 * (введен дополнительный идентификатор [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'));
  }
}
Example #2
0
function gameOver() {
  noise(audioURI, audioSprite.health_death);
  clearTimeout(healthNoticeTimerID);

  $healthGameOver.style.animationName = 'health-notice-game-over';
}
Example #3
0
function regeneration() {
  healthAnimation($healthRegeneration, 'health-notice-regeneration');
  noise(audioURI, audioHeal);
}
Example #4
0
function damage() {
  healthAnimation($healthDamage, 'health-notice-damage');
  noise(audioURI, audioHeartBeat);
  noise(audioURI, audioDamage);
}