Nicer temporary colour well.

This commit is contained in:
Niels Serup 2012-08-10 12:30:53 +02:00
parent 64f5640a60
commit c16fc5cd6a
1 changed files with 6 additions and 2 deletions

View File

@ -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))