Try to implement zombie spawning

This commit is contained in:
Reimar 2025-10-29 12:34:16 +01:00
parent 8841bded6f
commit ec2e16e7d7

View File

@ -18,6 +18,8 @@ void Game::update(std::stop_token stop_token)
while (!stop_token.stop_requested()) {
game_mutex.lock();
ticks++;
player.update();
for (Arrow *arrow : arrows) {
@ -25,7 +27,11 @@ void Game::update(std::stop_token stop_token)
}
for (Zombo *zombo : zombos) {
zombo->update(player.x, player.y); // doesn't work :((((
zombo->update(player.x, player.y);
}
if (ticks % 1000 == 0) {
zombos.push_back(new Zombo(&renderer, 20.0, 20.0)); // doesn't work :((((
}
renderer.redraw();