Very basic animations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user