feat: Random airfield spawning

This commit is contained in:
2026-04-16 22:50:27 +01:00
parent 965c0f393c
commit 49dd53f8e4
11 changed files with 76 additions and 10 deletions

30
src/sim/af_spawner.hpp Normal file
View File

@@ -0,0 +1,30 @@
#pragma once
#include <vector>
#include "../math.hpp"
#include "world_object.hpp"
#include "airfield.hpp"
namespace dxd::sim
{
class AFSpawner : public WorldObject
{
private:
std::vector<Airfield*> _airfields;
int _cur_tick;
int _next_spawn;
public:
AFSpawner()
{
_airfields = std::vector<Airfield*>();
_cur_tick = _next_spawn = 0;
}
void tick(float timestep, World *world) override;
void draw(Renderer *rend) override {}
};
} // namespace dxd::sim