gui/GuiManagerDebug/Core/_GetAllChildren2.int
Ryan 84bba39187 The library
This is for the love2d engine. Works with the latest version. Look at my intro to software project for some examples on how to use this
2017-06-10 16:06:50 -04:00

21 lines
413 B
Plaintext

function GetAllChildren2(Object)
local Stuff = {}
function Seek(Items)
for i=1,#Items do
table.insert(Stuff,Items[i])
local NItems = Items[i]:getChildren()
if NItems ~= nil then
Seek(NItems)
end
end
end
local Objs = Object:getChildren()
for i=1,#Objs do
table.insert(Stuff,Objs[i])
local Items = Objs[i]:getChildren()
if Items ~= nil then
Seek(Items)
end
end
return Stuff
end