Play weapon sounds when firing.
[koperkapel.git] / koperkapel / weapons.py
index f07caedb2404ae802bc94f280ea839fc9a38f621..ee83eb816c6eb5c9295db74c05fb78199d506e56 100644 (file)
@@ -18,6 +18,10 @@ class Weapon:
         if sound:
             self.sound = sounds.load(sound)
 
+    def play_sound(self):
+        if self.sound:
+            self.sound.play()
+
 
 WEAPONS = [
     Weapon("spit", damage=1, bullet_range=2, can_tape=False,