evolved state without registry in api

This commit is contained in:
BlackMATov
2024-11-21 00:27:51 +07:00
parent 053725355a
commit c13ea001d5
3 changed files with 9 additions and 22 deletions

View File

@@ -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