mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Compare commits
2 commits
bf3c3fa375
...
e5a8e9781f
Author | SHA1 | Date | |
---|---|---|---|
|
e5a8e9781f | ||
|
db1b29fa04 |
1 changed files with 3 additions and 2 deletions
|
@ -1473,11 +1473,12 @@ TEST("Hooks", function()
|
|||
local world = jecs.World.new()
|
||||
local A = world:component() :: Entity<boolean>
|
||||
local e1 = world:entity()
|
||||
world:add(e1, A)
|
||||
world:set(A, jecs.OnRemove, function(entity)
|
||||
CHECK(e1 == entity)
|
||||
CHECK(not world:has(e1, A))
|
||||
CHECK(world:has(e1, A))
|
||||
end)
|
||||
world:add(e1, A)
|
||||
|
||||
world:remove(e1, A)
|
||||
CHECK(not world:has(e1, A))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue