From c4ef591701fbb3adb280f2c90b824e0351f7da67 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Thu, 15 Dec 2022 15:15:11 +0200 Subject: [PATCH] use LayeredUpdate also, not move to local directory Signed-off-by: Raz Lifshitz --- pygame_functions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pygame_functions.py b/pygame_functions.py index e5bfe95..bfed7d1 100644 --- a/pygame_functions.py +++ b/pygame_functions.py @@ -7,15 +7,12 @@ import pygame, sys, os from pathlib import Path -DIR = Path(__file__).parent.absolute() -DIR = f'{DIR}'.replace('\\','/') -os.chdir(DIR) pygame.mixer.pre_init(44100, -16, 2, 512) pygame.init() pygame.mixer.init() -spriteGroup = pygame.sprite.OrderedUpdates() +spriteGroup = pygame.sprite.LayeredUpdates() textboxGroup = pygame.sprite.OrderedUpdates() gameClock = pygame.time.Clock() musicPaused = False