diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-01-30 13:01:01 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-01-30 13:01:01 -0500 |
commit | f3166702d7dd30312b5a401f52941aad43ac51c3 (patch) | |
tree | 08f15a0fde9ee7be08c9b4fe510dfa6ed04d4a78 /src/game.h | |
parent | 763bd80603dbace9f14c25309159ed07ec6e9a93 (diff) | |
download | tanetane-f3166702d7dd30312b5a401f52941aad43ac51c3.tar.gz tanetane-f3166702d7dd30312b5a401f52941aad43ac51c3.tar.bz2 tanetane-f3166702d7dd30312b5a401f52941aad43ac51c3.zip |
Added standing/walking animations
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game.h b/src/game.h index abb70ce..a8626fa 100644 --- a/src/game.h +++ b/src/game.h | |||
@@ -40,6 +40,20 @@ public: | |||
40 | 40 | ||
41 | void moveSprite(int id, vec2i newLoc); | 41 | void moveSprite(int id, vec2i newLoc); |
42 | 42 | ||
43 | void setSpriteWalking(int id, bool walking) { | ||
44 | sprites_[id].setWalking(walking); | ||
45 | } | ||
46 | |||
47 | void setSpriteDirection(int id, Direction dir) { | ||
48 | sprites_[id].setDirection(dir); | ||
49 | } | ||
50 | |||
51 | void tickSpriteAnim() { | ||
52 | for (Sprite& sprite : sprites_) { | ||
53 | sprite.tickAnim(); | ||
54 | } | ||
55 | } | ||
56 | |||
43 | private: | 57 | private: |
44 | 58 | ||
45 | std::vector<Sprite> sprites_; | 59 | std::vector<Sprite> sprites_; |