blob: 526a09b3ccb28d31b622c221813c4e3e787fd3cf (
plain) (
blame)
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
|
#ifndef BEHAVIOUR_SYSTEM_H_FC908ABE
#define BEHAVIOUR_SYSTEM_H_FC908ABE
#include "system.h"
#include "timer.h"
#include "vector.h"
enum class PathfindingOptions {
None = 0,
CardinalDirectionsOnly = 1 << 0
};
class Game;
class BehaviourSystem : public System {
public:
static constexpr SystemKey Key = SystemKey::Behaviour;
explicit BehaviourSystem(Game& game) : game_(game) {}
void tick(double dt) override;
void directSpriteToLocation(int spriteId, vec2i pos, PathfindingOptions options = PathfindingOptions::None);
bool isFollowingPath(int spriteId);
private:
void createPath(int spriteId);
Game& game_;
Timer timer_ { 500 };
};
#endif /* end of include guard: BEHAVIOUR_SYSTEM_H_FC908ABE */
|