From 5c5df6e068b2957987cb51b34d6930769424f8ca Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Fri, 29 Mar 2024 00:30:39 +0200 Subject: stats as object --- src/sliceitoff/enemies/enemies.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/sliceitoff/enemies/enemies.py') diff --git a/src/sliceitoff/enemies/enemies.py b/src/sliceitoff/enemies/enemies.py index 658c1aa..797fe31 100644 --- a/src/sliceitoff/enemies/enemies.py +++ b/src/sliceitoff/enemies/enemies.py @@ -3,7 +3,6 @@ from random import randrange from display import Scaling from text import Fonts -from stats import Stats class EnemySprite(pygame.sprite.Sprite): def __init__(self): @@ -49,9 +48,9 @@ class EnemyBall(EnemySprite): class Enemies(pygame.sprite.Group): - def __init__(self, field = None): + def __init__(self, field = None, count = 0): super().__init__() - for _ in range(Stats.enemies): + for _ in range(count): enemy = EnemyBall() enemy.set_position( (randrange(0,300_000), randrange(0,200_000)) ) enemy.set_movement( (randrange(0,200)-100, randrange(0,200)-100) ) -- cgit v1.2.3