mirror of
https://github.com/Ukendio/jecs.git
synced 2026-05-13 14:24:14 +00:00
remove world:targets() mention in 042_target.luau
This commit is contained in:
parent
7824c1aa55
commit
bbf9727220
1 changed files with 0 additions and 9 deletions
|
|
@ -6,10 +6,6 @@
|
|||
Use target when you have queried with a wildcard (e.g. pair(Eats, jecs.Wildcard))
|
||||
and need the actual target entity for each result. Without an index, the
|
||||
default is 0 (the first target).
|
||||
|
||||
world:targets(entity, relation) returns an iterator for all targets of a relation.
|
||||
|
||||
Use targets when you need to get every possible target for all indexes.
|
||||
]]
|
||||
|
||||
local jecs = require("@jecs")
|
||||
|
|
@ -39,8 +35,3 @@ print(third == nil) -- true
|
|||
-- Omitting the index is the same as index 0
|
||||
local default = world:target(bob, Eats)
|
||||
print(default == Apples) -- true
|
||||
|
||||
-- Iterates through all targets
|
||||
for target in world:targets(bob, Eats) do
|
||||
print(target)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue