about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-01-23 17:12:39 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-01-23 17:12:39 +0700
commitd35ce4f2294f1c2aa1ea55fc8a70ff44ac4a01ff (patch)
treefbd9c71c37c2e29fa02a9c735095c53dc29d00ec
parentd88db7fc051365c0126f65ae119b72486bbf2712 (diff)
downloadbrutalmaze-d35ce4f2294f1c2aa1ea55fc8a70ff44ac4a01ff.tar.gz
Make heartbeat more audible
-rw-r--r--brutalmaze/characters.py5
-rwxr-xr-xsetup.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/brutalmaze/characters.py b/brutalmaze/characters.py
index 0ffcd95..1b98411 100644
--- a/brutalmaze/characters.py
+++ b/brutalmaze/characters.py
@@ -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
diff --git a/setup.py b/setup.py
index fb11231..4bf6935 100755
--- a/setup.py
+++ b/setup.py
@@ -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']})