This commit is contained in:
Tercio
2013-08-09 14:42:33 -03:00
parent c5ea92caaf
commit 93be6d54a1
305 changed files with 10 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
--[[ Link actor with his twin shadow ]]
do
local _detalhes = _G._detalhes
local _rawget = rawget
local _setmetatable = setmetatable
--> default weaktable
_detalhes.weaktable = {__mode = "v"}
--> create link between two tables
function _detalhes:FazLinkagem (objeto)
local meus_links = _rawget (self, "links")
if (not meus_links) then
meus_links = _setmetatable ({}, _detalhes.weaktable)
self.links = meus_links
end
meus_links [#meus_links+1] = objeto
end
--> create the link
function _detalhes:CriaLink (link)
--> se tiver a tabela no overall
if (link) then
link:FazLinkagem (self)
end
end
end