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