summary refs log tree commit diff stats
path: root/src/character_system.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-03 12:33:03 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-03 12:33:03 -0500
commit683e22c419757744ce853c35d732f607ddb9af16 (patch)
treebc31c1c08f19d270f70b27737d4f6944d30759b7 /src/character_system.h
parent8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9 (diff)
downloadtanetane-683e22c419757744ce853c35d732f607ddb9af16.tar.gz
tanetane-683e22c419757744ce853c35d732f607ddb9af16.tar.bz2
tanetane-683e22c419757744ce853c35d732f607ddb9af16.zip
Added input system
Diffstat (limited to 'src/character_system.h')
-rw-r--r--src/character_system.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/character_system.h b/src/character_system.h index ff5db02..2eea233 100644 --- a/src/character_system.h +++ b/src/character_system.h
@@ -2,6 +2,9 @@
2#define PARTY_H_826F91BA 2#define PARTY_H_826F91BA
3 3
4#include "system.h" 4#include "system.h"
5#include "direction.h"
6#include "timer.h"
7#include "sprite.h"
5 8
6class Mixer; 9class Mixer;
7class Game; 10class Game;
@@ -14,9 +17,15 @@ public:
14 17
15 CharacterSystem(Game& game) : game_(game) {} 18 CharacterSystem(Game& game) : game_(game) {}
16 19
20 void initSprite(int spriteId);
21
22 void tick(double dt) override;
23
17 void addSpriteToParty(int leaderId, int followerId); 24 void addSpriteToParty(int leaderId, int followerId);
18 25
19 void moveSprite(int spriteId, Mixer& mixer, const Input& keystate); 26 void moveInDirection(int spriteId, Direction dir);
27
28 void stopDirecting(int spriteId);
20 29
21 void beginCrouch(int spriteId); 30 void beginCrouch(int spriteId);
22 31
@@ -26,7 +35,10 @@ private:
26 35
27 void stopRunning(int spriteId); 36 void stopRunning(int spriteId);
28 37
38 void setPartyState(int spriteId, CharacterState state);
39
29 Game& game_; 40 Game& game_;
41 Timer inputTimer_ {33};
30}; 42};
31 43
32#endif /* end of include guard: PARTY_H_826F91BA */ 44#endif /* end of include guard: PARTY_H_826F91BA */