aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyBulletSubScene.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 13:52:22 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 13:52:22 +0100
commit1413beea3b506b15b9f0080cec29c745d1ef88da (patch)
treef09efac3543adb16ea21b1d04d2c2cd4fb181d69 /game/enemy/EnemyBulletSubScene.cpp
parent1e25ce23534c1dcc7bebfc9fe33c1b587f15643a (diff)
pooling fix
Diffstat (limited to 'game/enemy/EnemyBulletSubScene.cpp')
-rw-r--r--game/enemy/EnemyBulletSubScene.cpp5
1 files changed, 1 insertions, 4 deletions
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);