summary refs log tree commit diff stats
path: root/src/behaviour_system.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-27 17:40:26 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-27 17:40:26 -0500
commite03683852cac9b31ca846fcf13ff53abf99232c7 (patch)
tree4f18e4f6d033547f8bf9210ff8466406ed6dbd49 /src/behaviour_system.h
parent4be70b7d55493cdc2d5e909d5101e70a16bee6f1 (diff)
downloadtanetane-e03683852cac9b31ca846fcf13ff53abf99232c7.tar.gz
tanetane-e03683852cac9b31ca846fcf13ff53abf99232c7.tar.bz2
tanetane-e03683852cac9b31ca846fcf13ff53abf99232c7.zip
Added A* pathfinding
Diffstat (limited to 'src/behaviour_system.h')
-rw-r--r--src/behaviour_system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/behaviour_system.h b/src/behaviour_system.h index 0eb4772..526a09b 100644 --- a/src/behaviour_system.h +++ b/src/behaviour_system.h
@@ -3,6 +3,12 @@
3 3
4#include "system.h" 4#include "system.h"
5#include "timer.h" 5#include "timer.h"
6#include "vector.h"
7
8enum class PathfindingOptions {
9 None = 0,
10 CardinalDirectionsOnly = 1 << 0
11};
6 12
7class Game; 13class Game;
8 14
@@ -15,8 +21,14 @@ public:
15 21
16 void tick(double dt) override; 22 void tick(double dt) override;
17 23
24 void directSpriteToLocation(int spriteId, vec2i pos, PathfindingOptions options = PathfindingOptions::None);
25
26 bool isFollowingPath(int spriteId);
27
18private: 28private:
19 29
30 void createPath(int spriteId);
31
20 Game& game_; 32 Game& game_;
21 Timer timer_ { 500 }; 33 Timer timer_ { 500 };
22}; 34};