summary refs log tree commit diff stats
path: root/src/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h14
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
43private: 57private:
44 58
45 std::vector<Sprite> sprites_; 59 std::vector<Sprite> sprites_;