Difference between revisions of "Sprite"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' android | + | '''<translate>Supported platforms</translate>:''' [[File:Platform android]][[File:Platform ios]][[File:Platform mac]][[File:Platform pc]]<br/> |
− | '''Available since:''' Gideros 2011.6<br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
+ | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/EventDispatcher|EventDispatcher]]<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> | ||
− | The | + | The `Sprite` class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block.<br /> |
A sprite can contain child sprites which makes the scene tree hierarchy. | A sprite can contain child sprites which makes the scene tree hierarchy. | ||
Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.<br /> | Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.<br /> | ||
The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.<br /> | The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.<br /> | ||
− | A | + | A `Sprite` instance can exists without attaching the scene tree.<br /> |
− | An unattached sprite can receive | + | An unattached sprite can receive `Event.ENTER_FRAME` event but it will only receive mouse and touch events when it is attached to the scene tree.<br /></translate> |
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| |
Revision as of 09:28, 24 August 2018
Supported platforms: File:Platform androidFile:Platform iosFile:Platform macFile:Platform pc
Available since: Gideros 2011.6
Inherits from: EventDispatcher
Description
The `Sprite` class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block.
A sprite can contain child sprites which makes the scene tree hierarchy.
Transformations such as translation, rotation, scaling and color transforms propogates its effect to all of its children.
The drawing order is defined by the order of children. First child is drawn first and last child is drawn last. It is possible to change the drawing order by modifying the order of child list.
A `Sprite` instance can exists without attaching the scene tree.
An unattached sprite can receive `Event.ENTER_FRAME` event but it will only receive mouse and touch events when it is attached to the scene tree.
MethodsSprite.new creates a new Sprite object |
EventsEvent.ADDED_TO_STAGE ConstantsSprite.ADD |