blob: 178160c3d3fa543b66e2a0419324c7ec2880df8c (
plain)
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
|
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')
|