diff options
Diffstat (limited to 'src/sliceitoff/screens')
-rw-r--r-- | src/sliceitoff/screens/__init__.py | 2 | ||||
-rw-r--r-- | src/sliceitoff/screens/levelup.py | 27 | ||||
-rw-r--r-- | src/sliceitoff/screens/welcome.py | 15 |
3 files changed, 44 insertions, 0 deletions
diff --git a/src/sliceitoff/screens/__init__.py b/src/sliceitoff/screens/__init__.py new file mode 100644 index 0000000..a03f76b --- /dev/null +++ b/src/sliceitoff/screens/__init__.py @@ -0,0 +1,2 @@ +#from .levelup import LevelUp +from .welcome import Welcome diff --git a/src/sliceitoff/screens/levelup.py b/src/sliceitoff/screens/levelup.py new file mode 100644 index 0000000..178160c --- /dev/null +++ b/src/sliceitoff/screens/levelup.py @@ -0,0 +1,27 @@ +import os +import pygame + +from display import Scaling +from images import Images, Fonts +from stats import Stats + +class Status(): + def __init__(self): + self.sprites = pygame.sprite.Group() + + def update(self, dt): + """ Update sprites basis of dt. dt = milliseconds from last update """ + + score_str = ( + "{:02d}\x12 {:02d}\xfe {:02d}\x03 " + "{:02d}\x0e {:08d}\x0f").format( + Stats.level, + 99 if Stats.percent == 100 else int(Stats.percent), + Stats.lives, + Stats.bonus // 1000, + Stats.score) + self.sprites = TextGroup( + score_str, + (0, 282_000), + size = 16_000, + font = '8x8') diff --git a/src/sliceitoff/screens/welcome.py b/src/sliceitoff/screens/welcome.py new file mode 100644 index 0000000..ddfd997 --- /dev/null +++ b/src/sliceitoff/screens/welcome.py @@ -0,0 +1,15 @@ +from text import TextPage +from display import Scaling + +class Welcome(): + def __init__(self): + self.sprites = TextPage( + " Slice it off!\n" + "\n" + "* Do not hit the balls\n" + "* Slice off empty areas\n" + "* Slice off empty areas\n", + font = 'computer', + size = (8_000, 16_000), + grid = (9_000, 16_000) ) +
\ No newline at end of file |