-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
43 lines (33 loc) · 915 Bytes
/
Main.py
File metadata and controls
43 lines (33 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 6 15:25:17 2023
@author: carol
"""
from SplashScene import splash
from Installer import first_run_setup
from Constants import c, root
from Scenes import Scene_mgr
from IntroScene import Intro
from PlayScene import Play
from HighScoresScenes import HighScores
import sys
from babel.dates import format_timedelta
import babel.numbers # this is not used by me, but requiered by babel
#### FROM THE EXECUTABLE
print(f'Home directory: {root()}')
# Check if the script is running from a frozen executable
if not c('onefile'):
if getattr(sys, 'frozen', False):
first_time = first_run_setup(root(), splash)
if first_time:
sys.exit()
#### GAME
fps = 60
scenes = [Intro, Play, HighScores]
size = (c('width_window'), c('height_window'))
scenes_mgr = Scene_mgr(scenes, size, fps)
scenes_mgr.run()
"""
pygame.quit()
quit()
"""