import os import pygame from display import Scaling from images import Images, Fonts from stats import Stats from text import TextPage 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 = ( "\x12{:1d} \x03{:1d} \x0e{:02d} \xfe{:02d} " "\x0f{:08d}").format( Stats.level, Stats.lives, Stats.bonus // 1000, 99 if Stats.percent == 100 else int(Stats.percent), Stats.score) self.sprites = TextPage( score_str, pos = (0, 220_000), size = (12_000, 0), font = 'lcd')