mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2025-12-16 14:11:16 +07:00
pack/unpack id api
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
```
|
```
|
||||||
id :: id
|
id :: id
|
||||||
|
pack :: integer, integer -> id
|
||||||
|
unpack :: id -> integer, integer
|
||||||
alive :: id -> boolean
|
alive :: id -> boolean
|
||||||
destroy :: id -> ()
|
destroy :: id -> ()
|
||||||
get :: entity, fragment... -> component...
|
get :: entity, fragment... -> component...
|
||||||
|
|||||||
12
evolved.lua
12
evolved.lua
@@ -10,6 +10,18 @@ local evolved = {}
|
|||||||
---@nodiscard
|
---@nodiscard
|
||||||
function evolved.id() end
|
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
|
---@param id evolved.id
|
||||||
---@return boolean
|
---@return boolean
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
|
|||||||
Reference in New Issue
Block a user