diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-28 22:28:45 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-28 22:28:45 +0200 |
commit | f894c2fd09ed17540c49cb4083573861ded76554 (patch) | |
tree | cedbe5bab1b5f91b7e3dfb70c17f5114034e700e /src/sliceitoff/text/text.py | |
parent | f502b21183d307fcab9b353aa18609d15c3547f1 (diff) |
Show as sprite group with update
Diffstat (limited to 'src/sliceitoff/text/text.py')
-rw-r--r-- | src/sliceitoff/text/text.py | 8 |
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 = ( |