summaryrefslogtreecommitdiff
path: root/src/sliceitoff/status/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/status/status.py')
-rw-r--r--src/sliceitoff/status/status.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/sliceitoff/status/status.py b/src/sliceitoff/status/status.py
index bf0e864..5390299 100644
--- a/src/sliceitoff/status/status.py
+++ b/src/sliceitoff/status/status.py
@@ -18,26 +18,18 @@ class Status():
self.updated = True
self.sprites = pygame.sprite.Group()
-
- def __update_sprites(self):
- self.sprites.empty()
- y = 28_000
- score_str="{:010d}".format(self.score)
- for letter, x in zip(score_str, range(30_000,40_000,1_000)):
- self.sprites.add(LetterSprite(
- Images.surfaces[f"letter_{letter}"],
- Scaling.scale_to_display((x,y)) ))
- self.updated = False
-
def add_score(self, score_to_add):
self.updated = True
self.score += score_to_add
- def get_sprites(self):
+ def update(self, dt):
+ """ Update sprites basis of dt. dt = milliseconds from last update """
if self.updated:
- self.__update_sprites()
- return self.sprites
-
- def __del__(self):
- pass
- \ No newline at end of file
+ self.sprites.empty()
+ y = 28_000
+ score_str="{:010d}".format(self.score)
+ for letter, x in zip(score_str, range(30_000,40_000,1_000)):
+ self.sprites.add(LetterSprite(
+ Images.surfaces[f"letter_{letter}"],
+ Scaling.scale_to_display((x,y)) ))
+ self.updated = False