From f3166702d7dd30312b5a401f52941aad43ac51c3 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 30 Jan 2021 13:01:01 -0500 Subject: Added standing/walking animations --- src/game.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/game.h') 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: void moveSprite(int id, vec2i newLoc); + void setSpriteWalking(int id, bool walking) { + sprites_[id].setWalking(walking); + } + + void setSpriteDirection(int id, Direction dir) { + sprites_[id].setDirection(dir); + } + + void tickSpriteAnim() { + for (Sprite& sprite : sprites_) { + sprite.tickAnim(); + } + } + private: std::vector sprites_; -- cgit 1.4.1