From 1413beea3b506b15b9f0080cec29c745d1ef88da Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 8 Jan 2025 13:52:22 +0100 Subject: pooling fix --- game/enemy/EnemyBulletSubScene.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'game/enemy/EnemyBulletSubScene.cpp') diff --git a/game/enemy/EnemyBulletSubScene.cpp b/game/enemy/EnemyBulletSubScene.cpp index 96ea7de..4f95ce4 100644 --- a/game/enemy/EnemyBulletSubScene.cpp +++ b/game/enemy/EnemyBulletSubScene.cpp @@ -18,10 +18,7 @@ #include "../Random.h" using namespace crepe; using namespace std; -int EnemyBulletSubScene::create(Scene & scn){ - vec2 size = {20, 20}; - - static int counter = 0; +int EnemyBulletSubScene::create(Scene & scn, int counter){ string unique_name = "enemy_bullet_" + to_string(counter++); GameObject bullet = scn.new_object(unique_name.c_str(),"enemy_bullet",ENEMY_BULLET_POOL_LOCATION,0,1); -- cgit v1.2.3