feat: add wake, rose, terrain, pathfinding, gameover, clouds, enemy shooting, variable bird speed refactor: some things

This commit is contained in:
2026-09-19 13:17:46 +02:00
parent c80b4887e9
commit a2ffb45fc5
49 changed files with 3002 additions and 1178 deletions
+11 -11
View File
@@ -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;
}
}