blob: b20b5180416c3af4f291183fc5e009e9e3ac3b18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#include <entt/entity/registry.hpp>
#include <entt/signal/dispatcher.hpp>
#include <kurator/campaign/Scenario.h>
#include <kurator/sim/Battle.h>
#include "RandomSpawner.h"
#include "TeamManager.h"
namespace kurator
{
namespace sim
{
class BaseBattle : public Battle
{
public:
BaseBattle(const campaign::Scenario& scenario);
entt::registry& registry() override;
entt::dispatcher& dispatcher() override;
void update(float dt) override;
private:
template <typename System> void update(float dt);
double time;
entt::registry _registry;
entt::dispatcher _dispatcher;
RandomSpawner spawner;
TeamManager manager;
void pick_random_targets();
void keep_at_range();
void turrets(float dt);
void kill_off_dead();
};
} // namespace sim
} // namespace kurator
#include "BaseBattle.inl.h"
|