Sprite:addChild: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 5: Line 5:
<translate><br />
<translate><br />
Adds a sprite as a child to this sprite. The child is<br />
Adds a sprite as a child to this sprite. The child is<br />
added as a last child of this `Sprite` instance.<br />
added as a last child of this [[Special:MyLanguage/Sprite|Sprite]] instance.<br />
<br />
<br />
Sprites can have only one parent. Therefore if you add a child<br />
Sprites can have only one parent. Therefore if you add a child<br />

Revision as of 08:37, 24 August 2018

Available since: Gideros 2011.6
Class: Sprite

Description


Adds a sprite as a child to this sprite. The child is
added as a last child of this Sprite instance.

Sprites can have only one parent. Therefore if you add a child
object that already has a different sprite as a parent,
the sprite is removed from the child list of the other sprite
and then added to this sprite.

 Sprite:addChild(child)

Parameters

child: (Sprite) The child sprite to add.