changeset 620:b0f6259a5a87

Alien Death Sounds.
author Simon Cross <hodgestar@gmail.com>
date Sun, 08 Sep 2013 00:53:29 +0200
parents c58487b4b473
children e011e159b72d
files data/sounds/SOURCES.txt data/sounds/eviltoy1.ogg data/sounds/synth_detuned1.ogg nagslang/enemies.py
diffstat 4 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/data/sounds/SOURCES.txt	Sun Sep 08 00:50:45 2013 +0200
+++ b/data/sounds/SOURCES.txt	Sun Sep 08 00:53:29 2013 +0200
@@ -47,3 +47,29 @@
     http://creativecommons.org/licenses/by/3.0
 Notes:
     Ogg generated using 'oggenc -q -1 vocoder2_short.ogg'
+
+
+eviltoy1.ogg
+------------
+
+URL:
+    http://archive.org/download/Berklee44v13/Berklee44v13.zip
+Source:
+    http://archive.org/details/Berklee44v13
+License:
+    http://creativecommons.org/licenses/by/3.0
+Notes:
+    Ogg generated using 'oggenc -q -1 eviltoy1.ogg'
+
+
+synth_detuned1.ogg
+------------------
+
+URL:
+    http://archive.org/download/Berklee44v13/Berklee44v13.zip
+Source:
+    http://archive.org/details/Berklee44v13
+License:
+    http://creativecommons.org/licenses/by/3.0
+Notes:
+    Ogg generated using 'oggenc -q -1 synth_detuned1.ogg'
Binary file data/sounds/eviltoy1.ogg has changed
Binary file data/sounds/synth_detuned1.ogg has changed
--- a/nagslang/enemies.py	Sun Sep 08 00:50:45 2013 +0200
+++ b/nagslang/enemies.py	Sun Sep 08 00:53:29 2013 +0200
@@ -14,6 +14,7 @@
 from nagslang.mutators import FLIP_H
 from nagslang.resources import resources
 from nagslang.utils import vec_with_length
+from nagslang.sound import sound
 
 
 def get_editable_enemies():
@@ -161,10 +162,14 @@
             result.add += (DeadEnemy(self.get_space(), self.world,
                                      self.physicser.position,
                                      self.enemy_type),)
+            self.play_death_sound()
         self.move(result)
         self.attack(result)
         return result
 
+    def play_death_sound(self):
+        sound.play_sound("synth_detuned1.ogg")
+
     @classmethod
     def requires(cls):
         return [("name", "string"), ("position", "coordinates")]
@@ -377,6 +382,9 @@
                 return
         self.set_direction(*self.random_move())
 
+    def play_death_sound(self):
+        sound.play_sound("eviltoy1.ogg")
+
     @classmethod
     def requires(cls):
         return [("name", "string"), ("position", "coordinates")]