summaryrefslogtreecommitdiff
path: root/src/sliceitoff/enemies
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-18 18:08:20 +0200
committerViljami Ilola <+@hix.fi>2024-03-18 18:08:20 +0200
commit78704848d4459907a456044615714b59d4593b2f (patch)
treed56c8422793ff1c5b6554146980760d264a6a0fe /src/sliceitoff/enemies
parentb219c4f736e6b98dd247064b362997576954f0ff (diff)
stats, level_up, game_over
Diffstat (limited to 'src/sliceitoff/enemies')
-rw-r--r--src/sliceitoff/enemies/enemies.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sliceitoff/enemies/enemies.py b/src/sliceitoff/enemies/enemies.py
index 6a9fda4..d9ba59a 100644
--- a/src/sliceitoff/enemies/enemies.py
+++ b/src/sliceitoff/enemies/enemies.py
@@ -3,6 +3,7 @@ from random import randrange
from display import Scaling
from images import Images
+from stats import Stats
class EnemySprite(pygame.sprite.Sprite):
def __init__(self):
@@ -46,15 +47,13 @@ class EnemyBall(EnemySprite):
class Enemies():
- def __init__(self, field = None, level = 2):
+ def __init__(self, field = None):
self.sprites = pygame.sprite.Group()
- self.updated = True
- self.level = level
self.emerge_enemies()
self.field = field
def emerge_enemies(self):
- for _ in range(self.level * 1):
+ for _ in range(3 + (Stats.level-1) * 2):
enemy = EnemyBall()
enemy.set_position( (randrange(0,380_000), randrange(0,260_000)) )
enemy.set_movement( (randrange(0,200)-100, randrange(0,200)-100) )