From e78099deb1547d4067722dc10f6f0b27de510b10 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Fri, 3 Apr 2020 22:08:27 +0200 Subject: [PATCH] Moved sprite group initialization higher in order --- src/game/Game.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/Game.py b/src/game/Game.py index e1c1fea..6c208c7 100644 --- a/src/game/Game.py +++ b/src/game/Game.py @@ -5,6 +5,8 @@ from pathlib import Path from game.EventManager import EventManager from game.Screen import Screen +from src.game.Timer import Timer + class Game: def __init__(self): @@ -24,6 +26,7 @@ class Game: print("Initializing pygame...", end=" ") pygame.init() + self.spritesList = pygame.sprite.Group() print("OK") print("Initializing screen, params: " + str(self.config["window"]) + "...", end=" ") @@ -38,8 +41,6 @@ class Game: self.eventManager = EventManager(self) - self.spritesList = pygame.sprite.Group() - self.mainLoop() def mainLoop(self):