summaryrefslogtreecommitdiff
path: root/src/sliceitoff/__main__.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-20 17:46:10 +0200
committerViljami Ilola <+@hix.fi>2024-03-20 17:46:10 +0200
commit975e5dca49fb09fe2f762462f1c337c0d63735bf (patch)
tree4c837b346d7b7e4a9246c1be846f48d787a327ba /src/sliceitoff/__main__.py
parent398eebe7829622c6983cb28528f2208b4d596f32 (diff)
exploding text
Diffstat (limited to 'src/sliceitoff/__main__.py')
-rw-r--r--src/sliceitoff/__main__.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/sliceitoff/__main__.py b/src/sliceitoff/__main__.py
index 717403e..7d21c7d 100644
--- a/src/sliceitoff/__main__.py
+++ b/src/sliceitoff/__main__.py
@@ -9,9 +9,9 @@ import pygame
from display import Display
from images import Images, Fonts
-from game import Level
+from game import Level, Show
from stats import Stats
-from screens import Welcome
+from screens import welcome_screen
def sliceitoff():
@@ -20,22 +20,27 @@ def sliceitoff():
pygame.mouse.set_visible(False)
+ clock = pygame.time.Clock()
+
display = Display()
current_path = Path(__file__).parent.resolve()
Images.load_images( current_path )
Fonts.load_fonts( current_path )
- welcome = Welcome()
- display.update( [welcome.sprites] )
- sleep(2)
-
- clock = pygame.time.Clock()
+
+ welcome = Show(welcome_screen())
dt = 0
+ while welcome.step(dt):
+ dt = clock.tick()
+ display.update( [welcome.sprites] )
+
+
Stats.new_game()
while Stats.lives:
level = Level(display = display)
+ dt = 0
while level.step(dt):
dt = clock.tick()
if Stats.lives: