added title screen loading at launch

This commit is contained in:
2023-05-11 12:20:07 -04:00
parent 6f6eaa3c6d
commit 2ffd9bd929
2 changed files with 22 additions and 10 deletions

View File

@@ -2,11 +2,15 @@ import pygame
class Surface(pygame.Surface):
def __init__(self, window_size):
def __init__(self, window_size, resources_dir):
super().__init__(window_size, pygame.SRCALPHA)
self.running = True
self.next_surface = None
def update(self):
self.fill((0, 0, 0))
self.bg = pygame.image.load(resources_dir + '/images/bg.png').convert_alpha()
self.title = pygame.image.load(resources_dir + '/images/title.png').convert_alpha()
def update(self):
self.blit(self.bg, (0, 0))
self.blit(self.title, (0, 0))