mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2025-12-13 19:48:00 +07:00
21 lines
381 B
Lua
21 lines
381 B
Lua
local evolved = require 'evolved'
|
|
|
|
local registry = evolved.registry()
|
|
|
|
local fragments = {
|
|
position = registry:entity(),
|
|
velocity = registry:entity(),
|
|
}
|
|
|
|
do
|
|
local entity = registry:entity()
|
|
entity:insert(fragments.position)
|
|
entity:insert(fragments.velocity)
|
|
end
|
|
|
|
do
|
|
local query = registry:query(
|
|
fragments.position,
|
|
fragments.velocity)
|
|
end
|