mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
Correct Cleanup example: Change OnSet to OnAdd
`jecs.OnSet` no longer exists. This should be `jecs.OnAdd` instead, which does exist.
This commit is contained in:
parent
353a7992de
commit
b30b3910e9
1 changed files with 2 additions and 2 deletions
|
|
@ -13,8 +13,8 @@ world:set(Model, jecs.OnRemove, function(entity)
|
|||
model:Destroy()
|
||||
end)
|
||||
|
||||
world:set(Model, jecs.OnSet, function(entity, model)
|
||||
-- OnSet is invoked after the data has been assigned.
|
||||
world:set(Model, jecs.OnAdd, function(entity, id, model)
|
||||
-- OnAdd is invoked after the data has been assigned.
|
||||
-- It also returns the data for faster access.
|
||||
-- There may be some logic to do some side effects on reassignments
|
||||
model:SetAttribute("entityId", entity)
|
||||
|
|
|
|||
Loading…
Reference in a new issue