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/EnemyBulletPool.cpp | |
parent | 1e25ce23534c1dcc7bebfc9fe33c1b587f15643a (diff) |
pooling fix
Diffstat (limited to 'game/enemy/EnemyBulletPool.cpp')
-rw-r--r-- | game/enemy/EnemyBulletPool.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/game/enemy/EnemyBulletPool.cpp b/game/enemy/EnemyBulletPool.cpp index 6ebd50a..63afca3 100644 --- a/game/enemy/EnemyBulletPool.cpp +++ b/game/enemy/EnemyBulletPool.cpp @@ -4,5 +4,8 @@ using namespace std; void EnemyBulletPool::create_bullets(crepe::Scene & scn) { EnemyBulletSubScene bullet; - while(bullet.create(scn) < this->MAXIMUM_AMOUNT); + int amount = 0; + while (amount < this->MAXIMUM_AMOUNT) { + amount = bullet.create(scn, amount); + } } |