Sprite:removeFromParent

From GiderosMobile
Revision as of 15:31, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2011.6
Class: Sprite

Description

If the sprite has a parent, removes the sprite from the child list of its parent sprite. <syntaxhighlight lang="lua"> Sprite:removeFromParent() </source>

This function is equilavent to: <syntaxhighlight lang="lua"> function Sprite:removeFromParent() local parent = self:getParent() if parent ~= nil then parent:removeChild(self) end end </source>