Move systems into subdirectory, add tree shake animation
This commit is contained in:
@@ -25,6 +25,9 @@ typedef struct ActionDepositResource {
|
||||
ecs_entity_t entity;
|
||||
} ActionDepositResource;
|
||||
|
||||
typedef struct Action Action;
|
||||
typedef void (*ActionCb)(ecs_entity_t entity, Action *action, Game *game);
|
||||
|
||||
typedef struct Action {
|
||||
ActionType type;
|
||||
union {
|
||||
@@ -37,6 +40,9 @@ typedef struct Action {
|
||||
bool finished;
|
||||
bool failed;
|
||||
|
||||
ActionCb onBegin;
|
||||
ActionCb onFinish;
|
||||
|
||||
struct Action *next;
|
||||
} Action;
|
||||
|
||||
@@ -49,6 +55,7 @@ void handleAction(ecs_entity_t entity, UnitAction *unitAction, Game *game);
|
||||
void updateAction(UnitAction *unitAction, Game *game);
|
||||
void clearActions(ecs_entity_t entity, Game *game);
|
||||
void addAction(ecs_entity_t entity, Game *game, const Action *action);
|
||||
void prependAction(ecs_entity_t entity, Game *game, const Action *action);
|
||||
|
||||
const char *actionTypeToPrettyStr(ActionType type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user