Sprite:removeFromParent

From GiderosMobile
Revision as of 10:04, 23 August 2018 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> If the sprite has a parent, removes the sprite from the child list of its parent sprite. This f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2011.6

Description


If the sprite has a parent, removes the sprite from the child list of its parent sprite. This function is equilavent to:

<pre><code>
function Sprite:removeFromParent()
local parent = self:getParent()
if parent ~= nil then
parent:removeChild(self)
end
end

</code></pre>

= Sprite:removeFromParent()