feat: Random airfield spawning
This commit is contained in:
30
src/sim/af_spawner.hpp
Normal file
30
src/sim/af_spawner.hpp
Normal 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
|
||||
Reference in New Issue
Block a user