forked from avose/ChromoCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.h
30 lines (22 loc) · 743 Bytes
/
player.h
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
#ifndef PLAYER_H
#define PLAYER_H
#include "types.h"
#include "tower.h"
#include "bag.h"
typedef struct {
char name[128]; // Player name
double base_mana; // Player's base (max) mana pool
double mana; // Player's mana pool
tower_t *towers; // Array of player's towers
u32b_t ntowers; // Number of towers
u32b_t stowers; // Size of tower array
bag_t bag; // Inventory
double xp; // Player xp (points/score)
} player_t;
////////////////////////////////////////////////////////////
// Interface
////////////////////////////////////////////////////////////
#ifndef PLAYER_C
extern void player_add_tower(player_t *player, vector3_t *position);
#endif
#endif