Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
memorycode committed Nov 23, 2024
1 parent 52ec4d8 commit 34d32eb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/World.luau
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,6 @@ function World:contains(id)
return self.allEntities[id] ~= nil
end

--[=[
Gets a specific component (or set of components) from a specific entity in this world.
@param entityId number -- The entity ID
@param ... Component -- The components to fetch
@return ... -- Returns the component values in the same order they were passed in
]=]

-- This function call gets inlined
local function field(entityRecord, archetype, idToIndex, component)
local field = idToIndex[component.id]
Expand All @@ -550,6 +542,13 @@ local function field(entityRecord, archetype, idToIndex, component)
return archetype.fields[field][entityRecord.indexInArchetype]
end

--[=[
Gets a specific component (or set of components) from a specific entity in this world.
@param entityId number -- The entity ID
@param ... Component -- The components to fetch
@return ... -- Returns the component values in the same order they were passed in
]=]
function World:get(entityId: EntityId, ...: Component)
assertWorldOperationIsValid(self, entityId, ...)

Expand Down

0 comments on commit 34d32eb

Please sign in to comment.