24 lines
320 B
C
24 lines
320 B
C
|
#ifndef _HF_MOVE_
|
||
|
#define _HF_MOVE_
|
||
|
|
||
|
#include <raylib.h>
|
||
|
|
||
|
typedef enum Curve {
|
||
|
CURVE_LINEAR,
|
||
|
CURVE_EASE_IN_OUT,
|
||
|
} Curve;
|
||
|
|
||
|
typedef struct Move Move;
|
||
|
|
||
|
struct Move {
|
||
|
Vector2 origin;
|
||
|
Vector2 destination;
|
||
|
Curve curve;
|
||
|
float current_time;
|
||
|
float end_time;
|
||
|
};
|
||
|
|
||
|
Vector2 move_position(Move *m, float delta);
|
||
|
|
||
|
#endif
|