summaryrefslogtreecommitdiff
path: root/src/sliceitoff/field
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-24 01:22:39 +0200
committerViljami Ilola <+@hix.fi>2024-03-24 01:22:39 +0200
commitcd128f5bc4fae39fb7e77683758d437f64eb4203 (patch)
treef4f3efbca3e11e7f6fb73a227ad09ef11918ec48 /src/sliceitoff/field
parent4353670f0cee67550b20dfcfd51b81386372f358 (diff)
gameover, level x and level up screens
Diffstat (limited to 'src/sliceitoff/field')
-rw-r--r--src/sliceitoff/field/field.py11
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):