support background type: night
This commit is contained in:
parent
1281c0363e
commit
53acd60212
@ -32,6 +32,7 @@ class Level(tool.State):
|
||||
|
||||
def setupBackground(self):
|
||||
img_index = self.map_data[c.BACKGROUND_TYPE]
|
||||
self.background_type = img_index
|
||||
self.background = tool.GFX[c.BACKGROUND_NAME][img_index]
|
||||
self.bg_rect = self.background.get_rect()
|
||||
|
||||
@ -91,7 +92,10 @@ class Level(tool.State):
|
||||
self.drag_plant = False
|
||||
self.hint_image = None
|
||||
self.hint_plant = False
|
||||
if self.background_type == c.BACKGROUND_DAY:
|
||||
self.produce_sun = True
|
||||
else:
|
||||
self.produce_sun = False
|
||||
self.sun_timer = self.current_time
|
||||
|
||||
self.removeMouseImage()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user