aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyPool.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/EnemyPool.cpp
parent1e25ce23534c1dcc7bebfc9fe33c1b587f15643a (diff)
pooling fix
Diffstat (limited to 'game/enemy/EnemyPool.cpp')
-rw-r--r--game/enemy/EnemyPool.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/enemy/EnemyPool.cpp b/game/enemy/EnemyPool.cpp
index b5160db..50d0e6a 100644
--- a/game/enemy/EnemyPool.cpp
+++ b/game/enemy/EnemyPool.cpp
@@ -3,5 +3,8 @@
using namespace std;
void EnemyPool::create_enemies(crepe::Scene & scn) {
EnemySubScene enemy;
- while(enemy.create(scn) < this->MAXIMUM_AMOUNT);
+ int amount = 0;
+ while (amount < this->MAXIMUM_AMOUNT) {
+ amount = enemy.create(scn, amount);
+ }
}