blob: 99a3ce96abaeca0c7927b56ad5e3392888817ab4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include "raylib.h"
#include "raytmx.h"
#include "map.h"
typedef enum { PLAYER_IDLE, PLAYER_WALK, PLAYER_ATTACK } PlayerState;
typedef struct {
int potions;
int bombs;
int currency;
} Inventory;
typedef struct {
Vector2 position;
float speed;
Rectangle bounds;
TmxTileset tileset;
int currentFrame;
float frameTime;
PlayerState state;
bool facingRight;
int health;
int maxHealth;
Inventory inventory;
} Player;
void UpdatePlayer(Player *player, Map *map, struct Entities *entities);
void DrawPlayer(Player *player);
|