diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-24 01:22:39 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-24 01:22:39 +0200 |
commit | cd128f5bc4fae39fb7e77683758d437f64eb4203 (patch) | |
tree | f4f3efbca3e11e7f6fb73a227ad09ef11918ec48 /src/sliceitoff/field/field.py | |
parent | 4353670f0cee67550b20dfcfd51b81386372f358 (diff) |
gameover, level x and level up screens
Diffstat (limited to 'src/sliceitoff/field/field.py')
-rw-r--r-- | src/sliceitoff/field/field.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sliceitoff/field/field.py b/src/sliceitoff/field/field.py index 134501c..f1a2086 100644 --- a/src/sliceitoff/field/field.py +++ b/src/sliceitoff/field/field.py @@ -128,8 +128,9 @@ class Field(pygame.sprite.LayeredUpdates): area = ax, y2, aw, y3-y2 self.explode(area) - self.add(SliceSprite(area)) - return Scaling.area_to_rect( area ) + zap_spite = SliceSprite(area) + self.add(zap_spite) + return zap_spite def active_sprites(self): """ Returns all sprites that are not dead """ @@ -137,9 +138,9 @@ class Field(pygame.sprite.LayeredUpdates): def explode(self, area): sx, sy, w, h = area - for x in range(int(sx),int(sx+w),4_000): - for y in range(int(sy),int(sy+h),3_000): - self.add(ExplodedField((x,y,3_000,3_000))) + for x in range(int(sx),int(sx+w),8_000): + for y in range(int(sy),int(sy+h),8_000): + self.add(ExplodedField((x,y,4_000,4_000))) def kill_if_not_colliding(self, sprites): |