From b9b64aa313a45ab53f856242b4ce5ddb151533fb Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 20 Apr 2024 21:39:07 +0300 Subject: sfx subpackage --- src/sliceitoff/game/game.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sliceitoff/game/game.py') diff --git a/src/sliceitoff/game/game.py b/src/sliceitoff/game/game.py index 832ab76..7a91ede 100644 --- a/src/sliceitoff/game/game.py +++ b/src/sliceitoff/game/game.py @@ -14,6 +14,7 @@ from sliceitoff.screens import ( instructions1_screen, instructions2_screen) from sliceitoff.hiscores import HiScores +from sliceitoff.sfx import sfx from .mainmenu import Mainmenu, MenuItems from .level import Level @@ -23,12 +24,14 @@ from .initials import Initials class Game: """ This is the whole game. """ def __init__(self): + assets_path = Path(__file__).parent.parent.resolve().joinpath('assets') pygame.init() + sfx.init(assets_path) self.clock = pygame.time.Clock() self.display = Display() self.stats = None self.hiscores = HiScores() - Fonts.load_fonts( Path(__file__).parent.parent.resolve() ) + Fonts.load_fonts(assets_path) pygame.mouse.set_visible(False) def __del__(self): -- cgit v1.2.3