diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 10:35:56 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 16:00:53 -0500 |
commit | df093323e48426e8d54a504aeae4155fa3c8e605 (patch) | |
tree | ec8f5d4abb898a69607e3f29e7572ae7841675a5 /src/animation_system.h | |
parent | bf39e32f2ec9008e48b0dd3ad53d640434e0738a (diff) | |
download | tanetane-df093323e48426e8d54a504aeae4155fa3c8e605.tar.gz tanetane-df093323e48426e8d54a504aeae4155fa3c8e605.tar.bz2 tanetane-df093323e48426e8d54a504aeae4155fa3c8e605.zip |
Added variable animation frame rates
Lucas's climbing animation now accurately uses 60fps and looks correct finally!
Diffstat (limited to 'src/animation_system.h')
-rw-r--r-- | src/animation_system.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/animation_system.h b/src/animation_system.h index a116673..c64c2dc 100644 --- a/src/animation_system.h +++ b/src/animation_system.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define ANIMATION_SYSTEM_H_CCCC7CB8 | 2 | #define ANIMATION_SYSTEM_H_CCCC7CB8 |
3 | 3 | ||
4 | #include <string_view> | 4 | #include <string_view> |
5 | #include <vector> | ||
5 | #include "direction.h" | 6 | #include "direction.h" |
6 | #include "system.h" | 7 | #include "system.h" |
7 | #include "timer.h" | 8 | #include "timer.h" |
@@ -28,7 +29,7 @@ private: | |||
28 | void updateAnimation(int spriteId); | 29 | void updateAnimation(int spriteId); |
29 | 30 | ||
30 | Game& game_; | 31 | Game& game_; |
31 | Timer animTimer_ {1000/5};//30fps * 1000 t/s;; | 32 | std::vector<Timer> animTimers_ = {{1000/5}, {1000/60}};//30fps * 1000 t/s;; |
32 | }; | 33 | }; |
33 | 34 | ||
34 | #endif /* end of include guard: ANIMATION_SYSTEM_H_CCCC7CB8 */ | 35 | #endif /* end of include guard: ANIMATION_SYSTEM_H_CCCC7CB8 */ |