Skip to content

Commit

Permalink
[IMP] Improve screen entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
japinol7 committed Apr 15, 2023
1 parent 9e9d297 commit cef7a79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions codemaster/tools/screen/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, game):
self.previous = None
self.game = game

def start_up(self, current_time):
def start_up(self, current_time=None, *args, **kwargs):
self.start_time = current_time
self.done = False
pg.display.set_caption(self.game.name_short)
Expand Down Expand Up @@ -73,7 +73,7 @@ class ExitCurrentGame(Screen):
def __init__(self, game):
super().__init__(game)

def start_up(self):
def start_up(self, current_time=None, *args, **kwargs):
super().start_up(current_time=self.game.current_time)

while not self.done:
Expand Down Expand Up @@ -101,7 +101,7 @@ class GameOver(Screen):
def __init__(self, game):
super().__init__(game)

def start_up(self):
def start_up(self, current_time=None, *args, **kwargs):
super().start_up(current_time=self.game.current_time)

while not self.done:
Expand Down Expand Up @@ -129,7 +129,7 @@ class Help(Screen):
def __init__(self, game):
super().__init__(game)

def start_up(self):
def start_up(self, current_time=None, *args, **kwargs):
super().start_up(current_time=self.game.current_time)
clock = pg.time.Clock()

Expand Down Expand Up @@ -162,7 +162,7 @@ def __init__(self, game):
self.background_screenshot = None
self.is_full_screen_switch = False

def start_up(self, is_full_screen_switch=False):
def start_up(self, current_time=None, is_full_screen_switch=False, *args, **kwargs):
self.is_full_screen_switch = is_full_screen_switch
if self.is_full_screen_switch:
self._full_screen_switch_hook()
Expand Down Expand Up @@ -207,7 +207,7 @@ class StartGame(Screen):
def __init__(self, game):
super().__init__(game)

def start_up(self):
def start_up(self, current_time=None, *args, **kwargs):
super().start_up(current_time=self.game.current_time)
clock = pg.time.Clock()
self.game.is_start_screen = True
Expand Down

0 comments on commit cef7a79

Please sign in to comment.