Stage::add()
Adds a sprite to the stage. Sprites are drawn in the order they were added, so a sprite added later is drawn on top of one added earlier.
Examples
Syntax
Java
.add(sprite)
.add(text)
.add(pen)
Parameters
| Name | Data Type | Description |
|---|---|---|
| sprite | Sprite | the sprite to add |
| text | Text | a text |
| pen | Pen | the Pen object to be added to the stage |
Return
void