diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-03 02:03:59 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-03 02:03:59 -0500 |
commit | 8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9 (patch) | |
tree | 7bcc12dd2efab7e24867895c5ef3fbb3e7d0e36d /src/animation_system.cpp | |
parent | be09120d1d044b476ef8b516efbdb526f20d9e2d (diff) | |
download | tanetane-8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9.tar.gz tanetane-8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9.tar.bz2 tanetane-8d7ef2b2ae3ddff204f5934fe67c535d7f1345e9.zip |
Converted Party into CharacterSystem
Diffstat (limited to 'src/animation_system.cpp')
-rw-r--r-- | src/animation_system.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/animation_system.cpp b/src/animation_system.cpp index 3320e1d..cf34066 100644 --- a/src/animation_system.cpp +++ b/src/animation_system.cpp | |||
@@ -91,9 +91,11 @@ void AnimationSystem::tick(double dt) { | |||
91 | animTimer_.accumulate(dt); | 91 | animTimer_.accumulate(dt); |
92 | while (animTimer_.step()) { | 92 | while (animTimer_.step()) { |
93 | for (Sprite& sprite : game_.getSprites() | game_.spriteView()) { | 93 | for (Sprite& sprite : game_.getSprites() | game_.spriteView()) { |
94 | sprite.animationFrame++; | 94 | if (sprite.isAnimated) { |
95 | if (sprite.animationFrame >= sprite.animations[sprite.animationId].size()) { | 95 | sprite.animationFrame++; |
96 | sprite.animationFrame = 0; | 96 | if (sprite.animationFrame >= sprite.animations[sprite.animationId].size()) { |
97 | sprite.animationFrame = 0; | ||
98 | } | ||
97 | } | 99 | } |
98 | } | 100 | } |
99 | } | 101 | } |