feat: add wake, rose, terrain, pathfinding, gameover, clouds, enemy shooting, variable bird speed refactor: some things
This commit is contained in:
+11
-11
@@ -1,17 +1,17 @@
|
||||
#include "engine.h"
|
||||
#include "engineAnimation.h"
|
||||
|
||||
void UpdateAnimation(Animation *animation, float deltaTime) {
|
||||
animation->animTimer += deltaTime;
|
||||
float frameTime = 1.0f / animation->framesSpeed;
|
||||
animation->animTimer += deltaTime;
|
||||
float frameTime = 1.0f / animation->framesSpeed;
|
||||
|
||||
if (animation->animTimer < frameTime) {
|
||||
return;
|
||||
}
|
||||
if (animation->animTimer < frameTime) {
|
||||
return;
|
||||
}
|
||||
|
||||
animation->animTimer -= frameTime;
|
||||
animation->currentFrame++;
|
||||
animation->animTimer -= frameTime;
|
||||
animation->currentFrame++;
|
||||
|
||||
if (animation->currentFrame >= animation->maxFrame) {
|
||||
animation->currentFrame = 0;
|
||||
}
|
||||
if (animation->currentFrame >= animation->maxFrame) {
|
||||
animation->currentFrame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user