projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed eyeball colour; associated popping sound with eyeball
[tabakrolletjie.git]
/
tabakrolletjie
/
enemies.py
diff --git
a/tabakrolletjie/enemies.py
b/tabakrolletjie/enemies.py
index 4fc9470ba90155cf109f20a7292496b148982039..0bd2d43f4afe720ae31cc37f6052889147383a8d 100644
(file)
--- a/
tabakrolletjie/enemies.py
+++ b/
tabakrolletjie/enemies.py
@@
-102,6
+102,8
@@
class Mould(pymunk.Body):
name = random.choice(
('eyeballA.png', 'eyeballB.png', 'eyeballC.png'))
self._eyeball = loader.load_image("32", name)
name = random.choice(
('eyeballA.png', 'eyeballB.png', 'eyeballC.png'))
self._eyeball = loader.load_image("32", name)
+ eyelid = loader.load_image("32", "eyelid.png", transform=self._transform)
+ self._eyeball.blit(eyelid, (0, 0), None)
return self._eyeball
def set_health(self, new_health):
return self._eyeball
def set_health(self, new_health):
@@
-146,8
+148,6
@@
class Mould(pymunk.Body):
child._health = self._health
moulds.append(child)
refresh = True
child._health = self._health
moulds.append(child)
refresh = True
- if random.randint(0, 10) < 2:
- sound.play_sound("mouth_pop_2a.ogg")
if self._age in MOULD_STAGES:
# We grow in size
if self._age in MOULD_STAGES:
# We grow in size
@@
-157,6
+157,7
@@
class Mould(pymunk.Body):
if self._age > MOULD_STAGES[1] and random.randint(0, 500) < 1:
# Maybe we grow an eyeball
self.has_eyeball = True
if self._age > MOULD_STAGES[1] and random.randint(0, 500) < 1:
# Maybe we grow an eyeball
self.has_eyeball = True
+ sound.play_sound("mouth_pop_2a.ogg")
if self._age > MAX_AGE:
# We die of old age
if self._age > MAX_AGE:
# We die of old age