diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-08 13:52:22 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-08 13:52:22 +0100 |
commit | 1413beea3b506b15b9f0080cec29c745d1ef88da (patch) | |
tree | f09efac3543adb16ea21b1d04d2c2cd4fb181d69 /game/enemy/EnemySubScene.cpp | |
parent | 1e25ce23534c1dcc7bebfc9fe33c1b587f15643a (diff) |
pooling fix
Diffstat (limited to 'game/enemy/EnemySubScene.cpp')
-rw-r--r-- | game/enemy/EnemySubScene.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/game/enemy/EnemySubScene.cpp b/game/enemy/EnemySubScene.cpp index 66aedd5..82401a1 100644 --- a/game/enemy/EnemySubScene.cpp +++ b/game/enemy/EnemySubScene.cpp @@ -18,10 +18,8 @@ using namespace crepe; using namespace std; //#TODO add sound -int EnemySubScene::create(Scene & scn){ - vec2 size = {20, 20}; +int EnemySubScene::create(Scene & scn,int enemy_counter){ - static int enemy_counter = 0; string unique_name = "enemy_" + to_string(enemy_counter++); GameObject enemy = scn.new_object(unique_name.c_str(),"enemy",ENEMY_POOL_LOCATION,0,1); |