From 78704848d4459907a456044615714b59d4593b2f Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 18 Mar 2024 18:08:20 +0200 Subject: stats, level_up, game_over --- src/sliceitoff/enemies/enemies.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/sliceitoff/enemies') 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) ) -- cgit v1.2.3