mirror of
https://github.com/Ukendio/jecs.git
synced 2025-06-20 00:09: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,
|
||||
nextArchetypeId = 0
|
||||
}, World)
|
||||
self.ROOT_ARCHETYPE = archetypeOf(self, {}, nil)
|
||||
return self
|
||||
end
|
||||
|
||||
|
@ -164,7 +163,6 @@ type World = typeof(World.new())
|
|||
|
||||
local function ensureArchetype(world: World, types, prev)
|
||||
if #types < 1 then
|
||||
|
||||
if not world.ROOT_ARCHETYPE then
|
||||
local ROOT_ARCHETYPE = archetypeOf(world, {}, nil)
|
||||
world.ROOT_ARCHETYPE = ROOT_ARCHETYPE
|
||||
|
@ -451,6 +449,6 @@ function World.query(world: World, ...: i53): (() -> (number, ...any)) | () -> (
|
|||
end
|
||||
end
|
||||
|
||||
return {
|
||||
return table.freeze({
|
||||
World = World
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue