diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 21:01:40 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 21:01:40 +0100 |
commit | 900cfa9f31de40308b9ea3d0c73372d44f11094c (patch) | |
tree | c40c2012c30738af86e7d7c5c072ab06a4198182 /src/crepe/system | |
parent | 0a1739de21e5ab270cb45efb6fc0aed092d81227 (diff) |
make format
Diffstat (limited to 'src/crepe/system')
-rw-r--r-- | src/crepe/system/AnimatorSystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index ff8d2ce..9cf8ba5 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -16,7 +16,7 @@ void AnimatorSystem::update() { for (Animator & a : animations) { if (!a.active) continue; - + Animator::Data & ctx = a.data; double frame_duration = 1.0f / ctx.fps; @@ -28,7 +28,7 @@ void AnimatorSystem::update() { ctx.curr_row = ctx.cycle_start + curr_frame; ctx.spritesheet.mask.x = ctx.curr_row * ctx.spritesheet.mask.w; ctx.spritesheet.mask.y = (ctx.curr_col * ctx.spritesheet.mask.h); - + if (!ctx.looping && curr_frame == total_frames - 1) { a.active = false; } |