ChildOf as built-in component

This commit is contained in:
Ukendio 2024-07-03 02:23:16 +02:00
parent ebc916c7ef
commit 0324d3a33f

View file

@ -338,6 +338,9 @@ function World.new(): World
}, World) }, World)
self.ROOT_ARCHETYPE = archetypeOf(self, {}) self.ROOT_ARCHETYPE = archetypeOf(self, {})
-- Initialize built-in components
nextEntityId(self.entityIndex, EcsChildOf)
return self return self
end end
@ -1026,8 +1029,11 @@ return {
OnAdd = (EcsOnAdd :: any) :: Entity, OnAdd = (EcsOnAdd :: any) :: Entity,
OnRemove = (EcsOnRemove :: any) :: Entity, OnRemove = (EcsOnRemove :: any) :: Entity,
OnSet = (EcsOnSet :: any) :: Entity, OnSet = (EcsOnSet :: any) :: Entity,
Wildcard = (EcsWildcard :: any) :: Entity, Wildcard = (EcsWildcard :: any) :: Entity,
w = (EcsWildcard :: any) :: Entity, w = (EcsWildcard :: any) :: Entity,
ChildOf = EcsChildOf,
Rest = EcsRest, Rest = EcsRest,
IS_PAIR = ECS_IS_PAIR, IS_PAIR = ECS_IS_PAIR,