Added missing do keyword in the loops

This commit is contained in:
lambtoken 2023-12-23 09:37:03 +01:00
parent 7b8f7b2f0a
commit f9da8dbe92

View file

@ -294,14 +294,14 @@ end
-- Defining a function
function mySystemClass:update(dt)
-- Iterate over all entities in the Pool
for _, e in ipairs(self.pool)
for _, e in ipairs(self.pool) do
-- Do something with the Components
e.position.x = e.position.x + e.velocity.x * dt
e.position.y = e.position.y + e.velocity.y * dt
end
-- Iterate over all entities in the second Pool
for _, e in ipairs(self.secondPool)
for _, e in ipairs(self.secondPool) do
-- Do something
end
end