Partial entity inspector
This commit is contained in:
@@ -29,10 +29,17 @@ ECS_MOVE(Path, dst, src, {
|
||||
})
|
||||
|
||||
ECS_DTOR(Arms, arms, {
|
||||
if (arms->primary)
|
||||
if (arms->primary) {
|
||||
ecs_delete(ECS, arms->primary);
|
||||
if (arms->secondary)
|
||||
arms->primary = 0;
|
||||
}
|
||||
if (arms->secondary) {
|
||||
ecs_delete(ECS, arms->secondary);
|
||||
arms->secondary = 0;
|
||||
}
|
||||
})
|
||||
ECS_MOVE(Arms, dst, src, {
|
||||
*dst = *src;
|
||||
});
|
||||
|
||||
void setupSystems() {
|
||||
@@ -45,7 +52,8 @@ void setupSystems() {
|
||||
.move_dtor = ecs_move(Path)
|
||||
});
|
||||
ecs_set_hooks(ECS, Arms, {
|
||||
.dtor = ecs_dtor(Arms)
|
||||
.dtor = ecs_dtor(Arms),
|
||||
.move_dtor = ecs_move(Arms)
|
||||
});
|
||||
|
||||
ECS_OBSERVER(ECS, entityPathRemove, EcsOnRemove, Path);
|
||||
|
||||
Reference in New Issue
Block a user