projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41fd097
)
Load sounds on weapon init
author
Neil
<neil@dip.sun.ac.za>
Sat, 5 Mar 2016 20:27:04 +0000
(22:27 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Sat, 5 Mar 2016 20:27:09 +0000
(22:27 +0200)
koperkapel/weapons.py
patch
|
blob
|
history
diff --git
a/koperkapel/weapons.py
b/koperkapel/weapons.py
index 3962ecc96917cd14a3e7908af3dbe03485d40ea1..d2213f6144a4e8f9b98ebf8e0e5611807b6a8e6a 100644
(file)
--- a/
koperkapel/weapons.py
+++ b/
koperkapel/weapons.py
@@
-1,6
+1,6
@@
""" Tools for dealing with weapons. """
-from pgzero.loaders import images
+from pgzero.loaders import images
, sounds
from .actors.animsurf import AnimatedSurfActor
from .util import safepath
@@
-14,7
+14,9
@@
class Weapon:
self.damage = damage
self.bullet_range = bullet_range
self.can_tape = can_tape
- self.sound = sound
+ self.sound = None
+ if sound:
+ self.sound = sounds.load(sound)
WEAPONS = [