Fix digging

This commit is contained in:
Bram Verhulst
2024-05-07 10:35:18 +02:00
parent 77784a167e
commit d3b932df22
20 changed files with 406 additions and 83 deletions

View File

@@ -1,6 +1,8 @@
#include "pch.h"
#include "Animation.h"
#include <iostream>
#include "utils.h"
Animation::Animation(Texture* pTexture, int frames, float frameDuration, Rectf srcRect, bool isLooping): m_pTexture(pTexture), m_SrcRect(srcRect), m_Frames(frames), m_isLooping(isLooping), m_FrameDuration(frameDuration) {

View File

@@ -23,6 +23,7 @@ public:
m_CurrentFrame = 0;
m_hasPlayedOnce = false;
m_isPlaying = true;
m_FrameTimer = m_FrameDuration;
}
bool IsDone() const {
return m_hasPlayedOnce && !m_isLooping;