shade eyeball
authoradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 19:04:54 +0000 (21:04 +0200)
committeradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 19:05:03 +0000 (21:05 +0200)
tabakrolletjie/enemies.py

index 0bd2d43f4afe720ae31cc37f6052889147383a8d..146ef56fa973e9823e0e09bc111947bf6d723183 100644 (file)
@@ -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