This commit is contained in:
2021-09-10 19:36:15 +02:00
parent 24b8fa0a58
commit 95fc749c6c
12 changed files with 129 additions and 161 deletions

View File

@@ -24,12 +24,25 @@ class Multiscene(Scene):
self.subscenes_prepared = True
def light_update(self):
for subscene in self.subscenes:
subscene.light_update()
for object_ in self.l_objects:
object_.update()
object_.blit()
pygame.display.update()
def update(self):
if self.subscenes_prepared is False:
self.prepare_subscenes()
self.s_.fill(self.bg)
for object_ in self.l_objects:
object_.update()
for object_ in self.r_objects:
object_.blit()
@@ -101,20 +114,6 @@ class Multiscene(Scene):
return i_objects
def start_bgt_objects(self):
for object_ in self.bgt_objects:
object_.start_bg_activity()
for subscene in self.subscenes:
subscene.start_bg_activity()
def stop_bgt_objects(self):
for object_ in self.bgt_objects:
object_.stop_bg_activity()
for subscene in self.subscenes:
subscene.stop_bg_activity()
@staticmethod
def to_ints(iterable):
for i in range(len(iterable)):