Difference between revisions of "Sprite"
m (→Description: I used grammarly to correct some spelling errors.) |
|||
Line 9: | Line 9: | ||
The [[Special:MyLanguage/Sprite|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 /> | The [[Special:MyLanguage/Sprite|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 | + | Transformations such as translation, rotation, scaling, and color transforms, propagate its effect to all of its children.<br /> |
− | The drawing order is defined by the order of children. | + | The drawing order is defined by the order of children. The first child is drawn first and the last child is drawn last. It is possible to change the drawing order by modifying the order of child list.<br /> |
− | A [[Special:MyLanguage/Sprite|Sprite]] instance can | + | A [[Special:MyLanguage/Sprite|Sprite]] instance can exist without attaching the scene tree.<br /> |
An unattached sprite can receive [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event but it will only receive mouse and touch events when it is attached to the scene tree.<br /></translate> | An unattached sprite can receive [[Special:MyLanguage/Event.ENTER_FRAME|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;"| | ||
+ | |||
=== <translate>Methods</translate> === | === <translate>Methods</translate> === | ||
[[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/><!-- GIDEROSMTD:Sprite.new() creates a new Sprite object --> | [[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/><!-- GIDEROSMTD:Sprite.new() creates a new Sprite object --> |
Revision as of 03:03, 4 April 2019
Supported platforms:
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, propagate its effect to all of its children.
The drawing order is defined by the order of children. The first child is drawn first and the last child is drawn last. It is possible to change the drawing order by modifying the order of child list.
A Sprite instance can exist 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 |