aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-05 16:44:25 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-05 16:44:25 +0100
commitf693119c9e102a9b51a1015168ee2a56f2309dd1 (patch)
tree0773bd53ab98d2052ecd67c608d9dd6970e6dca9 /src/crepe/api
parentcf6ca6be5a9deac4de921f50d0aedf6a6156e0f4 (diff)
fixed AnimatorSystem bug so that it takes delta time instead of elapsed time, the Animator api has not been changed
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Animator.h7
1 files changed, 7 insertions, 0 deletions
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;
};