aboutsummaryrefslogtreecommitdiff
path: root/include/player.h
blob: 0c9799bd22ff24c28f63b1a00e61a1804d94046b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef PLAYER_H
#define PLAYER_H

#include "map_manager.h"
#include "raylib.h"

typedef struct Player {
  Vector2 position;
  float speed;
  Rectangle bounds;
  
  // Animation state
  TmxTileset tileset;
  int currentFrame;
  float frameTime;
  int state; // 0: idle, 1: walk, etc.
  bool facingRight;
} Player;

void UpdatePlayer(Player *p, MapManager *mapMgr);
void DrawPlayer(Player *p);

#endif