Moved sprite group initialization higher in order

This commit is contained in:
Marcin Kostrzewski 2020-04-03 22:08:27 +02:00
parent fcac23a878
commit e78099deb1

View File

@ -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):