From cd128f5bc4fae39fb7e77683758d437f64eb4203 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sun, 24 Mar 2024 01:22:39 +0200 Subject: gameover, level x and level up screens --- src/sliceitoff/field/field.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sliceitoff/field') 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): -- cgit v1.2.3