From f693119c9e102a9b51a1015168ee2a56f2309dd1 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Sun, 5 Jan 2025 16:44:25 +0100 Subject: fixed AnimatorSystem bug so that it takes delta time instead of elapsed time, the Animator api has not been changed --- src/crepe/api/Animator.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/crepe/api/Animator.h') diff --git a/src/crepe/api/Animator.h b/src/crepe/api/Animator.h index 102894d..efc2f6e 100644 --- a/src/crepe/api/Animator.h +++ b/src/crepe/api/Animator.h @@ -1,6 +1,7 @@ #pragma once #include "../types.h" +#include "../manager/LoopTimerManager.h" #include "Component.h" #include "Sprite.h" @@ -99,6 +100,12 @@ private: //! The maximum number of rows and columns inside the spritesheet const uvec2 grid_size; + // the time elapsed from a frame duration + duration_t elapsed_time = {}; + + // frame counter + unsigned int frame = 0; + //! Uses the spritesheet friend AnimatorSystem; }; -- cgit v1.2.3