Add entity_factory
This commit is contained in:
@@ -152,6 +152,21 @@ typedef struct EntityArms {
|
||||
* Gameplay components
|
||||
*********************************************************/
|
||||
|
||||
|
||||
typedef struct WeaponMelee {
|
||||
|
||||
} WeaponMelee;
|
||||
typedef struct WeaponRanged {
|
||||
|
||||
} WeaponRanged;
|
||||
typedef struct WeaponShield {
|
||||
|
||||
} WeaponShield;
|
||||
typedef struct AttachedWeapons {
|
||||
ecs_entity_t primary;
|
||||
ecs_entity_t secondary;
|
||||
} AttachedWeapons;
|
||||
|
||||
extern ECS_COMPONENT_DECLARE(UnitAction);
|
||||
extern ECS_COMPONENT_DECLARE(UnitAI);
|
||||
|
||||
@@ -185,11 +200,4 @@ extern ECS_TAG_DECLARE(Attackable);
|
||||
|
||||
void initComponentIDs(ecs_world_t *ecs);
|
||||
|
||||
static ecs_entity_t entityCreate(ecs_world_t *ecs) {
|
||||
ecs_entity_t entity = ecs_new_id(ecs);
|
||||
ecs_add_id(ecs, entity, GameEntity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
#endif //PIXELDEFENSE_COMPONENTS_H
|
||||
|
||||
Reference in New Issue
Block a user