-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfactory.h
More file actions
32 lines (25 loc) · 705 Bytes
/
Copy pathfactory.h
File metadata and controls
32 lines (25 loc) · 705 Bytes
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
#ifndef FACTORY_H
#define FACTORY_H
#define FACTORY_INITIAL_HEALTH 8000
#define FACTORY_HEALTH_REGENERATION 200
#define FACTORY_BUILD_INTERVAL 0.5
#include "vector.h"
typedef struct Factory Factory;
#include "unit.h"
struct Factory {
Vector position;
float direction;
int team_id;
float health;
float next_build_interval;
};
void factory_initialize(Factory *);
int factory_is_dead(Factory *);
int factory_is_building(Factory *);
void factory_start_building(Factory *);
void factory_stop_building(Factory *);
void factory_update(Factory *, float);
int factory_try_build_unit(Factory *, Unit *);
float factory_health_percentage(Factory *);
float factory_build_percentage(Factory *);
#endif