summary refs log tree commit diff stats
path: root/src/entity.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-02-16 10:02:05 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-02-16 10:02:05 -0500
commita34396730c8d993fea84a454690bd13ea9a9b403 (patch)
tree5f226ee45acaa7070a1bb821df3320e907a9ecb2 /src/entity.h
parent8ffb27ab09ff567a159e5be5a243fd3967084977 (diff)
downloaddispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.tar.gz
dispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.tar.bz2
dispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.zip
Started implementing pushing, but not really
Diffstat (limited to 'src/entity.h')
-rw-r--r--src/entity.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/entity.h b/src/entity.h index d99680f..8d28b98 100644 --- a/src/entity.h +++ b/src/entity.h
@@ -3,6 +3,20 @@
3 3
4#include "vector.h" 4#include "vector.h"
5 5
6enum class ColliderType {
7 player,
8 train,
9 other
10};
11
12enum class Direction {
13 none,
14 left,
15 right,
16 up,
17 down
18};
19
6class Entity { 20class Entity {
7public: 21public:
8 22
@@ -14,17 +28,23 @@ public:
14 vec2s gridPos; 28 vec2s gridPos;
15 29
16 // Movement 30 // Movement
31 Direction shouldMoveTo = Direction::none;
17 bool moving = false; 32 bool moving = false;
18 vec2s destPos; 33 vec2s destPos;
19 double movementTween = 0.0; 34 double movementTween = 0.0;
20 double speed = 0.0; // Tiles per second 35 double speed = 0.0; // Tiles per second
21 36
22 // Player 37 // Player
23 bool player = false; 38 bool controllable = false;
24 39
25 // Collision 40 // Collision
41 ColliderType colliderType = ColliderType::other;
42
26 bool playerCanPush = false; 43 bool playerCanPush = false;
27 bool trainCanPush = false; 44 bool trainCanPush = false;
45
46 // Temp
47 int colorVal = 25;
28 48
29}; 49};
30 50