pack/unpack id api

This commit is contained in:
BlackMATov
2024-12-12 15:12:50 +07:00
parent 6bd2dc727f
commit 1afac4886d
2 changed files with 14 additions and 0 deletions

View File

@@ -2,6 +2,8 @@
```
id :: id
pack :: integer, integer -> id
unpack :: id -> integer, integer
alive :: id -> boolean
destroy :: id -> ()
get :: entity, fragment... -> component...

View File

@@ -10,6 +10,18 @@ local evolved = {}
---@nodiscard
function evolved.id() end
---@param index integer
---@param version integer
---@return evolved.id
---@nodiscard
function evolved.pack(index, version) end
---@param id evolved.id
---@return integer index
---@return integer version
---@nodiscard
function evolved.unpack(id) end
---@param id evolved.id
---@return boolean
---@nodiscard