mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2026-01-05 01:51:00 +07:00
evolved state without registry in api
This commit is contained in:
@@ -3,12 +3,11 @@ local evolved = require 'evolved.evolved'
|
||||
---@class evolved.singles
|
||||
local singles = {}
|
||||
|
||||
---@param registry evolved.registry
|
||||
---@param component any
|
||||
---@return evolved.entity
|
||||
---@nodiscard
|
||||
function singles.create(registry, component)
|
||||
local single = evolved.create_entity(registry)
|
||||
function singles.create(component)
|
||||
local single = evolved.create_entity()
|
||||
evolved.insert_component(single, single, component)
|
||||
return single
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user