Add actions
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <flecs.h>
|
||||
|
||||
#include "game_tileset.h"
|
||||
#include "unit_actions.h"
|
||||
|
||||
extern ECS_TAG_DECLARE(TextureTerrain);
|
||||
extern ECS_TAG_DECLARE(TextureBuildings);
|
||||
@@ -124,6 +125,12 @@ typedef struct EntityArms {
|
||||
* Gameplay components
|
||||
*********************************************************/
|
||||
|
||||
extern ECS_COMPONENT_DECLARE(UnitAction);
|
||||
|
||||
typedef struct ActionOverseer {
|
||||
|
||||
} ActionOverseer;
|
||||
|
||||
extern ECS_TAG_DECLARE(Selectable);
|
||||
extern ECS_TAG_DECLARE(Selected);
|
||||
|
||||
@@ -144,27 +151,13 @@ extern ECS_TAG_DECLARE(Workable);
|
||||
extern ECS_TAG_DECLARE(Attackable);
|
||||
|
||||
typedef struct Storage {
|
||||
int capacity[RES_COUNT];
|
||||
int amount[RES_COUNT];
|
||||
int reserved[RES_COUNT];
|
||||
int pending[RES_COUNT];
|
||||
int capacity[RES_COUNT];
|
||||
int amount[RES_COUNT];
|
||||
int reserved[RES_COUNT];
|
||||
int pending[RES_COUNT];
|
||||
} Storage;
|
||||
extern ECS_COMPONENT_DECLARE(Storage);
|
||||
|
||||
typedef struct HarvestTask {
|
||||
ecs_entity_t entity;
|
||||
} HarvestTask;
|
||||
extern ECS_COMPONENT_DECLARE(HarvestTask);
|
||||
|
||||
typedef struct WorkerTask {
|
||||
enum {
|
||||
HARVEST,
|
||||
BUILD,
|
||||
} type;
|
||||
ecs_entity_t target;
|
||||
//struct WorkerTask *next;
|
||||
} WorkerTask;
|
||||
|
||||
void initComponentIDs(ecs_world_t *ecs);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user