Make heartbeat more audible

This commit is contained in:
Nguyễn Gia Phong 2018-01-23 17:12:39 +07:00
parent d88db7fc05
commit d35ce4f229
2 changed files with 3 additions and 4 deletions

View File

@ -77,9 +77,8 @@ class Hero:
self.wound -= HEAL_SPEED / self.spin_speed / HERO_HP
if self.wound < 0: self.wound = 0.0
if time > self.next_beat:
wound = self.wound / HERO_HP
play(self.sfx_heart, wound ** 0.5)
self.next_beat = time + MIN_BEAT*(2-wound)
self.sfx_heart.play()
self.next_beat = time + MIN_BEAT*(2 - self.wound/HERO_HP)
if self.slashing and time >= self.next_strike:
self.next_strike = time + ATTACK_SPEED

View File

@ -28,5 +28,5 @@ setup(
keywords='pygame action-game arcade-game maze',
packages=['brutalmaze'],
install_requires=['pygame>=1.9'],
package_data={'brutalmaze': ['icon.png', '*.ogg']},
package_data={'brutalmaze': ['icon.png', 'soundfx/*.ogg']},
entry_points={'gui_scripts': ['brutalmaze = brutalmaze:main']})