Merge pull request #76 from lambtoken/typo-fix

Added missing do keyword in the loops
This commit is contained in:
Justin van der Leij 2024-06-30 10:38:15 +02:00 committed by GitHub
commit 9f187f12e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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