mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-22 07:56:52 -06:00
Update README.md
This commit is contained in:
@@ -40,11 +40,9 @@ local tiny = require("tiny")
|
|||||||
|
|
||||||
local talkingSystem = tiny.system()
|
local talkingSystem = tiny.system()
|
||||||
talkingSystem.filter = tiny.requireAll("name", "mass", "phrase")
|
talkingSystem.filter = tiny.requireAll("name", "mass", "phrase")
|
||||||
function talkingSystem:update(world, entities, dt)
|
function talkingSystem:process(e, dt)
|
||||||
for p in pairs(entities) do
|
e.mass = e.mass + dt * 3
|
||||||
p.mass = p.mass + dt * 3
|
print(e.name .. ", who weighs " .. e.mass .. " pounds, says, \"" .. e.phrase .. "\"")
|
||||||
print(p.name .. ", who weighs " .. p.mass .. " pounds, says, \"" .. p.phrase .. "\"")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local joe = {
|
local joe = {
|
||||||
|
|||||||
Reference in New Issue
Block a user