From c16fc5cd6a16365b6b1a1d23110c2cd0ca3648a8 Mon Sep 17 00:00:00 2001 From: Niels Serup Date: Fri, 10 Aug 2012 12:30:53 +0200 Subject: [PATCH] Nicer temporary colour well. --- robotgame/block.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/robotgame/block.py b/robotgame/block.py index 97f56d7..e21bcce 100644 --- a/robotgame/block.py +++ b/robotgame/block.py @@ -190,10 +190,14 @@ class ColorWell(Block): self.__dict__.update(locals()) worldobject.WorldObject.__init__( self, level, x, y, movable=False) - self.img = pygame.Surface((128, 96)) - self.set_colour(0, 0, 0) + self.img = pygame.Surface((64, 64)) def set_colour(self, r, g, b): self.well_colour = r * 255, g * 255, b * 255 self.img.fill(self.well_colour) + def draw(self, window): + if self.visible: + window.blit(self.img, (self.x - self.level.camera_x, + self.y - self.img.get_size()[1] + - self.level.camera_y))