added preliminary dev menu
This commit is contained in:
@@ -12,6 +12,7 @@ class GameSurface(pygame.Surface):
|
||||
resource_dir (:obj:`str`): The path of the game's main resource directory.
|
||||
game_fps (int): How many frames per second the game will run at.
|
||||
additional_args (dict): Additional arguments to send to the next surface after halting.
|
||||
bg (:obj:`pygame.Surface`): The background of the surface.
|
||||
"""
|
||||
def __init__(self, game_res, resources_dir, game_fps):
|
||||
"""
|
||||
@@ -30,7 +31,7 @@ class GameSurface(pygame.Surface):
|
||||
self._input_handler = InputHandler(self._clock)
|
||||
self.additional_args = {}
|
||||
|
||||
self._bg = pygame.image.load(self.resource_dir + '/images/bg.png').convert_alpha()
|
||||
self.bg = pygame.image.load(self.resource_dir + '/images/bg.png').convert_alpha()
|
||||
self.sprites = pygame.sprite.Group()
|
||||
|
||||
def preprocess(self):
|
||||
@@ -39,7 +40,7 @@ class GameSurface(pygame.Surface):
|
||||
"""
|
||||
self._clock.tick(self.game_fps)
|
||||
|
||||
self.blit(self._bg, (0, 0))
|
||||
self.blit(self.bg, (0, 0))
|
||||
self.sprites.update()
|
||||
self.sprites.draw(self)
|
||||
|
||||
|
Reference in New Issue
Block a user