summaryrefslogtreecommitdiff
path: root/sim/src/BaseSimulation.cpp
blob: ffd43f9519a15b67fc1013679e232c1c59560a12 (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
#include "BaseSimulation.h"

#include <kurator/sim/State.h>
#include <kurator/sim/FloatingMovement.h>
#include <kurator/sim/weapons.h>

#include "ai.h"
#include "systems.h"


namespace kurator
{
namespace sim
{


BaseSimulation::BaseSimulation(State& ctx)
{
	setup_ai_components(ctx);
	manager.extend(ctx);
}


void
BaseSimulation::operator()(State& ctx)
{
	pick_random_targets(ctx, manager);
	keep_at_range(ctx);
	FloatingMovement::update(ctx);
	update_turrets(ctx);
	shoot_at_targets(ctx);
	kill_off_dead(ctx);
	manager.update(ctx);
}


}  // namespace sim
}  // namespace kurator