Compare commits

..

No commits in common. "0cb994db0dd53fb8286e54ef1ae0cb668e085fb1" and "9109e3de9061a2e7103d203d43f4273bc8bf7d42" have entirely different histories.

View file

@ -38,23 +38,12 @@ world:set(sara, Name, "sara")
print(getName(parent(sara)))
for e, name in world:query(Name, pair(ChildOf, alice)) do
print(name, "is the child of alice")
for e in world:query(pair(ChildOf, alice)) do
print(getName(e), "is the child of alice")
end
-- Output
-- "alice"
-- bob is the child of alice
-- sara is the child of alice
local Position = world:component()
local Velocity = world:component()
local function things_move(world, dt)
for e, p, v in world:query(Position, Velocity) do
world:set(e, Position, p + v * dt)
end
end
things_move(world, 1/60)
```