summaryrefslogtreecommitdiff
path: root/src/sliceitoff/text
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-28 22:28:45 +0200
committerViljami Ilola <+@hix.fi>2024-03-28 22:28:45 +0200
commitf894c2fd09ed17540c49cb4083573861ded76554 (patch)
treecedbe5bab1b5f91b7e3dfb70c17f5114034e700e /src/sliceitoff/text
parentf502b21183d307fcab9b353aa18609d15c3547f1 (diff)
Show as sprite group with update
Diffstat (limited to 'src/sliceitoff/text')
-rw-r--r--src/sliceitoff/text/text.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sliceitoff/text/text.py b/src/sliceitoff/text/text.py
index 8c13004..da48f6c 100644
--- a/src/sliceitoff/text/text.py
+++ b/src/sliceitoff/text/text.py
@@ -15,11 +15,11 @@ class LetterSprite(pygame.sprite.Sprite):
Scaling.factor * (1_000 - randrange(2_000)),
Scaling.factor * (1_000 - randrange(2_000)))
- def update(self, explode = 0, **kwargs):
- if explode:
+ def update(self, dt = 0, explode = 0, **kwargs):
+ if explode and dt:
self.rect = pygame.Rect(
- self.rect.x + self.direction[0] * explode,
- self.rect.y + self.direction[1] * explode,
+ self.rect.x + self.direction[0] * dt,
+ self.rect.y + self.direction[1] * dt,
self.rect.w,
self.rect.h)
self.direction = (