Nicer temporary colour well.
This commit is contained in:
parent
64f5640a60
commit
c16fc5cd6a
|
@ -190,10 +190,14 @@ class ColorWell(Block):
|
||||||
self.__dict__.update(locals())
|
self.__dict__.update(locals())
|
||||||
worldobject.WorldObject.__init__(
|
worldobject.WorldObject.__init__(
|
||||||
self, level, x, y, movable=False)
|
self, level, x, y, movable=False)
|
||||||
self.img = pygame.Surface((128, 96))
|
self.img = pygame.Surface((64, 64))
|
||||||
self.set_colour(0, 0, 0)
|
|
||||||
|
|
||||||
def set_colour(self, r, g, b):
|
def set_colour(self, r, g, b):
|
||||||
self.well_colour = r * 255, g * 255, b * 255
|
self.well_colour = r * 255, g * 255, b * 255
|
||||||
self.img.fill(self.well_colour)
|
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))
|
||||||
|
|
Loading…
Reference in New Issue