From df093323e48426e8d54a504aeae4155fa3c8e605 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 24 Feb 2021 10:35:56 -0500 Subject: Added variable animation frame rates Lucas's climbing animation now accurately uses 60fps and looks correct finally! --- src/animation_system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/animation_system.h') 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 @@ #define ANIMATION_SYSTEM_H_CCCC7CB8 #include +#include #include "direction.h" #include "system.h" #include "timer.h" @@ -28,7 +29,7 @@ private: void updateAnimation(int spriteId); Game& game_; - Timer animTimer_ {1000/5};//30fps * 1000 t/s;; + std::vector animTimers_ = {{1000/5}, {1000/60}};//30fps * 1000 t/s;; }; #endif /* end of include guard: ANIMATION_SYSTEM_H_CCCC7CB8 */ -- cgit 1.4.1