2021-01-19 10:31:23 +00:00
|
|
|
#include "modules/physics.h"
|
2021-01-19 10:19:12 +00:00
|
|
|
|
2021-01-19 14:58:16 +00:00
|
|
|
void MoveWalk(ecs_iter_t *it) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-01-19 10:19:12 +00:00
|
|
|
void PhysicsImport(ecs_world_t *ecs) {
|
|
|
|
ECS_MODULE(ecs, Physics);
|
|
|
|
ecs_set_name_prefix(ecs, "Physics");
|
|
|
|
|
|
|
|
ECS_TAG(ecs, Walking);
|
|
|
|
ECS_TAG(ecs, Flying);
|
|
|
|
ECS_TYPE(ecs, Movement, Walking, Flying);
|
|
|
|
|
|
|
|
ECS_COMPONENT(ecs, Velocity);
|
|
|
|
|
2021-01-19 14:58:16 +00:00
|
|
|
ECS_SYSTEM(ecs, MoveWalk, EcsOnUpdate, general.Position, Velocity, SWITCH | Movement, CASE | Walking);
|
|
|
|
|
2021-01-19 10:19:12 +00:00
|
|
|
ECS_SET_TYPE(Movement);
|
|
|
|
ECS_SET_ENTITY(Walking);
|
|
|
|
ECS_SET_ENTITY(Flying);
|
|
|
|
ECS_SET_COMPONENT(Velocity);
|
2021-01-19 14:58:16 +00:00
|
|
|
ECS_SET_ENTITY(MoveWalk);
|
2021-01-19 10:19:12 +00:00
|
|
|
}
|