c-pong/include/player.h
2023-10-06 17:30:56 +02:00

26 lines
508 B
C

#ifndef PLAYER_H
#define PLAYER_H
#define PLAYER_WIDTH 25
#define PLAYER_HEIGHT 250
#define PLAYER_SPEED 6000.0
struct player
{
int x_location;
int y_location;
int speed;
};
enum player_move_dir
{
PLAYER_MOVE_UP,
PLAYER_MOVE_DOWN,
};
void player_move(struct player* player, float dt, enum player_move_dir dir);
void player_update(struct game_data* data, struct player* player, float dt);
struct player* player_init(int x_location, int move_limit, int speed);
#endif /* PLAYER_H */