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

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

#include "systems.h"
#include "TeamManager.h"


namespace kurator
{
namespace sim
{


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


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


}  // namespace sim
}  // namespace kurator