From: adrianna Date: Sat, 10 Sep 2016 18:16:39 +0000 (+0200) Subject: fixed eyeball colour; associated popping sound with eyeball X-Git-Tag: tabakrolletjie-v1.0.0~53^2~4 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=ea91002db68118e01b0d09527783a39b4112ac3e;p=tabakrolletjie.git fixed eyeball colour; associated popping sound with eyeball --- diff --git a/data/images/32/eyeballA.png b/data/images/32/eyeballA.png index c22acad..01cce3d 100644 Binary files a/data/images/32/eyeballA.png and b/data/images/32/eyeballA.png differ diff --git a/data/images/32/eyeballB.png b/data/images/32/eyeballB.png index d0702f0..e5bdde6 100644 Binary files a/data/images/32/eyeballB.png and b/data/images/32/eyeballB.png differ diff --git a/data/images/32/eyeballC.png b/data/images/32/eyeballC.png index 7b8f594..2825bd6 100644 Binary files a/data/images/32/eyeballC.png and b/data/images/32/eyeballC.png differ diff --git a/data/images/32/eyelid.png b/data/images/32/eyelid.png new file mode 100644 index 0000000..3da9774 Binary files /dev/null and b/data/images/32/eyelid.png differ diff --git a/data/images/Makefile b/data/images/Makefile index 17b0bef..cc3a9a2 100644 --- a/data/images/Makefile +++ b/data/images/Makefile @@ -3,7 +3,7 @@ VPATH=../../sources/vector SEED=seed TURNIP=turnip1 turnip2 turnip3 MOULD_BODY=mouldA mouldB mouldC -MOULD=eyeballA eyeballB eyeballC +MOULD=eyeballA eyeballB eyeballC eyelid LIGHT=spotlight lamp laser LIGHT_MASK=light_mask_2_1 light_mask_2_2 light_mask_3_1 light_mask_3_2 light_mask_3_3 CONTROLS=night default_cursor exit pause play diff --git a/sources/vector/eyeballA.svg b/sources/vector/eyeballA.svg index aa54309..45fa09e 100644 --- a/sources/vector/eyeballA.svg +++ b/sources/vector/eyeballA.svg @@ -26,14 +26,14 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.4" - inkscape:cx="132.16977" + inkscape:cx="6.4554843" inkscape:cy="182.29837" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" - inkscape:window-width="1366" + inkscape:window-width="1264" inkscape:window-height="720" - inkscape:window-x="1920" + inkscape:window-x="102" inkscape:window-y="0" inkscape:window-maximized="1"> - diff --git a/sources/vector/eyeballB.svg b/sources/vector/eyeballB.svg index 0886654..0262fd0 100644 --- a/sources/vector/eyeballB.svg +++ b/sources/vector/eyeballB.svg @@ -26,14 +26,14 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.4" - inkscape:cx="8.9698557" + inkscape:cx="-116.74443" inkscape:cy="182.29837" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" - inkscape:window-width="1366" + inkscape:window-width="1264" inkscape:window-height="720" - inkscape:window-x="1920" + inkscape:window-x="102" inkscape:window-y="0" inkscape:window-maximized="1"> - diff --git a/sources/vector/eyeballC.svg b/sources/vector/eyeballC.svg index c864b43..b400b57 100644 --- a/sources/vector/eyeballC.svg +++ b/sources/vector/eyeballC.svg @@ -26,14 +26,14 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.4" - inkscape:cx="123.25557" + inkscape:cx="-2.4587157" inkscape:cy="182.29837" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" - inkscape:window-width="1366" + inkscape:window-width="1264" inkscape:window-height="720" - inkscape:window-x="1920" + inkscape:window-x="102" inkscape:window-y="0" inkscape:window-maximized="1"> - diff --git a/sources/vector/eyelid.svg b/sources/vector/eyelid.svg new file mode 100644 index 0000000..b37277f --- /dev/null +++ b/sources/vector/eyelid.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/tabakrolletjie/enemies.py b/tabakrolletjie/enemies.py index 4fc9470..0bd2d43 100644 --- 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) + 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): @@ -146,8 +148,6 @@ class Mould(pymunk.Body): 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 @@ -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 + sound.play_sound("mouth_pop_2a.ogg") if self._age > MAX_AGE: # We die of old age