From: adrianna Date: Sat, 10 Sep 2016 19:04:54 +0000 (+0200) Subject: shade eyeball X-Git-Tag: tabakrolletjie-v1.0.0~53^2 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=61244c813873a57ad6bd7ff76c6faf49ce2a23ee;p=tabakrolletjie.git shade eyeball --- diff --git a/tabakrolletjie/enemies.py b/tabakrolletjie/enemies.py index 0bd2d43..146ef56 100644 --- a/tabakrolletjie/enemies.py +++ b/tabakrolletjie/enemies.py @@ -12,7 +12,7 @@ from .constants import (SCREEN_SIZE, MOULD_CATEGORY, OBSTACLE_CATEGORY, TURNIP_CATEGORY, COLOURS) from .loader import loader from .sound import sound -from .transforms import Multiply +from .transforms import Multiply, Overlay from .utils import debug_timer MOULD_FILTER = pymunk.ShapeFilter( @@ -101,7 +101,8 @@ class Mould(pymunk.Body): if not self._eyeball: name = random.choice( ('eyeballA.png', 'eyeballB.png', 'eyeballC.png')) - self._eyeball = loader.load_image("32", name) + self._eyeball = loader.load_image("32", name, + transform=Overlay(colour=self._transform.colour+(127,))) eyelid = loader.load_image("32", "eyelid.png", transform=self._transform) self._eyeball.blit(eyelid, (0, 0), None) return self._eyeball