Sprite::addCostume()
Adds a costume from an image file. The first costume added is the one the sprite wears.
Examples
Syntax
Java
.addCostume(name, imagePath)
.addCostume(imagePath)
.addCostume(name, imagePath, x, y, width, height)
Parameters
| Name | Data Type | Description |
|---|---|---|
| name | String | the costume's name, for switchCostume(String) |
| imagePath | String | the image file (PNG, JPEG, GIF, BMP or TGA) |
| x | int | left edge of the part, in pixels |
| y | int | top edge of the part, in pixels |
| width | int | width of the part |
| height | int | height of the part |
Return
void