mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Fix overview example
This commit is contained in:
parent
87754c19d2
commit
90d8467281
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ local Position = world:component()
|
|||
local Velocity = world:component()
|
||||
|
||||
for id, position, velocity in world:query(Position, Velocity) do
|
||||
world:set(id, Position, position += velocity)
|
||||
world:set(id, Position, position + velocity)
|
||||
world:set(id, Velocity, velocity * 0.9)
|
||||
end
|
||||
```
|
||||
|
@ -57,7 +57,7 @@ const Position = world.component()
|
|||
const Velocity = world.component()
|
||||
|
||||
for (const [id, position, velocity] of world.query(Position, Velocity)) {
|
||||
world.set(id, Position, position.add(velocity)
|
||||
world.set(id, Position, position.add(velocity))
|
||||
world.set(id, Velocity, velocity.mul(0.9))
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue