diff gamelib/equipment.py @ 99:f5d56688943b

Added background music support, and daytime and night time music (really animal sounds, not music)
author David Fraser <davidf@sjsoft.com>
date Wed, 02 Sep 2009 12:50:28 +0000
parents 5494af02a0e8
children 48019afde338
line wrap: on
line diff
--- a/gamelib/equipment.py	Wed Sep 02 12:14:24 2009 +0000
+++ b/gamelib/equipment.py	Wed Sep 02 12:50:28 2009 +0000
@@ -1,6 +1,7 @@
 """Stuff for animals to use."""
 
 import random
+import sound
 
 class Equipment(object):
     is_weapon = False
@@ -24,5 +25,6 @@
 
     def hit(self, gameboard, wielder, target):
         """Closer is more accurate."""
+        sound.play_sound("fire-rifle.ogg")
         return random.randint(1, 100) > 60 + 10*wielder.pos.dist(target.pos)