mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-18 20:59:20 +01:00
Fix digging
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user