Very basic animations

This commit is contained in:
2023-11-12 18:03:55 +01:00
parent bf56b150cc
commit 526d292fb5
9 changed files with 95 additions and 6 deletions

View File

@@ -30,6 +30,20 @@ typedef struct TextureRegion {
Rectangle rec;
} TextureRegion;
typedef enum AnimationType {
ANIMATION_IDLE,
ANIMATION_WALK,
} AnimationType;
typedef struct Animation {
TextureRegion firstFrame;
AnimationType currAnimation;
i32 currFrame;
i32 frameCount;
f32 frameDuration;
f32 elapsed;
} Animation;
#endif //PIXELDEFENSE_COMPONENTS_H