You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
886 B
27 lines
886 B
#ifndef ANIMATIONHANDLER_H_
|
|
#define ANIMATIONHANDLER_H_
|
|
#include "raylib.h"
|
|
#include "animation.h"
|
|
#include "stdio.h"
|
|
|
|
typedef struct AnimationHandler AnimationHandler;
|
|
|
|
typedef struct AnimationHandler{
|
|
Animation ***animations;
|
|
AnimationFrame *currentFrame;
|
|
Texture2D **spriteTexture;
|
|
int currentType;
|
|
int currentDirection;
|
|
int forward;
|
|
float deltaElapsed;
|
|
} AnimationHandler;
|
|
|
|
AnimationHandler * AnimationHandlerInit(Animation ***animations, Texture2D **spriteTexture);
|
|
void AnimationUpdate(AnimationHandler *animationHandler);
|
|
void AnimationReset(AnimationHandler *animationHandler);
|
|
void AnimationChangeAnimation(AnimationHandler *animationHandler, int animationType, int direction);
|
|
void AnimationChangeType(AnimationHandler *animationHandler, int animationType);
|
|
void AnimationChangeDirection(AnimationHandler *animationHandler, int direction);
|
|
|
|
#endif
|