Skip to content

Commit

Permalink
Update README.md (#113)
Browse files Browse the repository at this point in the history
Add missing argument to example on setting a component value.
  • Loading branch information
badcorporatelogo authored Nov 30, 2023
1 parent 3afe24e commit c9b15f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ entity = world.Create(Position, Velocity)
entry := world.Entry(entity)

// You can set or get the data via the ComponentType
Position.SetValue(math.Vec2{X: 10, Y: 20})
Velocity.SetValue(math.Vec2{X: 1, Y: 2})
Position.SetValue(entry, math.Vec2{X: 10, Y: 20})
Velocity.SetValue(entry, math.Vec2{X: 1, Y: 2})

position := Position.Get(entry)
velocity := Velocity.Get(entry)
Expand Down

0 comments on commit c9b15f4

Please sign in to comment.