eco2d/code/modules/modules/physics.h

25 lines
619 B
C
Raw Normal View History

2021-05-04 17:41:30 +00:00
#pragma once
#include "flecs/flecs.h"
2021-05-07 14:43:54 +00:00
#include "flecs/flecs_meta.h"
2021-05-04 17:41:30 +00:00
#include "modules/general.h"
2021-05-07 14:43:54 +00:00
ECS_ALIAS(Vector2D, Velocity);
2021-05-04 17:41:30 +00:00
typedef struct {
ECS_DECLARE_TYPE(Movement);
ECS_DECLARE_ENTITY(Walking);
ECS_DECLARE_ENTITY(Flying);
ECS_DECLARE_COMPONENT(Velocity);
ECS_DECLARE_ENTITY(MoveWalk);
} Physics;
#define PhysicsImportHandles(handles)\
ECS_IMPORT_TYPE(handles, Movement);\
ECS_IMPORT_ENTITY(handles, Walking);\
ECS_IMPORT_ENTITY(handles, Flying);\
ECS_IMPORT_COMPONENT(handles, Velocity);\
ECS_IMPORT_ENTITY(handles, MoveWalk);\
void PhysicsImport(ecs_world_t *ecs);