diff gamelib/animal.py @ 98:725b292ca07b

Added sounds killing foxes and chickens, and nightfall Renamed sounds for clarity
author David Fraser <davidf@sjsoft.com>
date Wed, 02 Sep 2009 12:14:24 +0000
parents bea1b9364583
children d17375586866
line wrap: on
line diff
--- a/gamelib/animal.py	Wed Sep 02 11:52:02 2009 +0000
+++ b/gamelib/animal.py	Wed Sep 02 12:14:24 2009 +0000
@@ -8,6 +8,7 @@
 import imagecache
 import tiles
 from misc import Position
+import sound
 
 class Animal(Sprite):
     """Base class for animals"""
@@ -77,6 +78,7 @@
         if not fox:
             return
         if weapon.hit(gameboard, self, fox):
+            sound.play_sound("kill-fox.ogg")
             gameboard.kill_fox(fox)
 
 class Egg(Animal):
@@ -200,6 +202,7 @@
 
     def _catch_chicken(self, chicken, gameboard):
         """Catch a chicken"""
+        sound.play_sound("kill-chicken.ogg")
         gameboard.remove_chicken(chicken)
         self.hunting = False