addCostume

fun addCostume(name: String, dataFormat: String, assetId: String, rotationCenter: Pair<Double, Double>? = null, bitmapResolution: Int = 1, path: Path? = null): Costume

Adds a costume to the sprite.

Parameters

name

The name of the costume.

dataFormat

The format of the asset.

assetId

The MD5 hash of the asset file.

rotationCenter

The center of rotation.

bitmapResolution

The resolution for bitmap images.

path

The local path to the asset file.


fun addCostume(path: Path, name: String, bitmapResolution: Int = 1, rotationCenter: Pair<Double, Double>? = null): Costume

Adds a costume from a local file.

Parameters

path

The path to the costume file.

name

The name for the costume.

bitmapResolution

The resolution for bitmap images.

rotationCenter

The center of rotation.