diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-03 12:33:03 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-03 12:33:03 -0500 |
| commit | 683e22c419757744ce853c35d732f607ddb9af16 (patch) | |
| tree | bc31c1c08f19d270f70b27737d4f6944d30759b7 /src/character_system.h | |
| parent | 8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9 (diff) | |
| download | tanetane-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.h | 14 |
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 | ||
| 6 | class Mixer; | 9 | class Mixer; |
| 7 | class Game; | 10 | class 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 */ |
