mirror of
https://github.com/Ukendio/jecs.git
synced 2025-06-20 08:19:18 +00:00
Remove ROOT_ARCHETYPE in world initializer
This commit is contained in:
parent
ffca213183
commit
201383dcac
1 changed files with 2 additions and 4 deletions
|
@ -156,7 +156,6 @@ function World.new()
|
||||||
nextId = 0,
|
nextId = 0,
|
||||||
nextArchetypeId = 0
|
nextArchetypeId = 0
|
||||||
}, World)
|
}, World)
|
||||||
self.ROOT_ARCHETYPE = archetypeOf(self, {}, nil)
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -164,7 +163,6 @@ type World = typeof(World.new())
|
||||||
|
|
||||||
local function ensureArchetype(world: World, types, prev)
|
local function ensureArchetype(world: World, types, prev)
|
||||||
if #types < 1 then
|
if #types < 1 then
|
||||||
|
|
||||||
if not world.ROOT_ARCHETYPE then
|
if not world.ROOT_ARCHETYPE then
|
||||||
local ROOT_ARCHETYPE = archetypeOf(world, {}, nil)
|
local ROOT_ARCHETYPE = archetypeOf(world, {}, nil)
|
||||||
world.ROOT_ARCHETYPE = ROOT_ARCHETYPE
|
world.ROOT_ARCHETYPE = ROOT_ARCHETYPE
|
||||||
|
@ -451,6 +449,6 @@ function World.query(world: World, ...: i53): (() -> (number, ...any)) | () -> (
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return table.freeze({
|
||||||
World = World
|
World = World
|
||||||
}
|
})
|
Loading…
Reference in a new issue