Properties

Link copied to clipboard
lateinit var allBlocks: Map<String, Block>
Link copied to clipboard
Link copied to clipboard

Creates a CloneTarget corresponding to the sprite.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Creates a DistanceObject corresponding to the sprite.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Creates a PropertyTarget corresponding to the sprite.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Creates a SpecialLocation corresponding to the sprite.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Creates a TouchObject corresponding to the sprite.

Link copied to clipboard

Functions

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

Adds a costume from a local file.

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.

Link copied to clipboard
open override fun <B : HatBlock> addHatBlock(hatBlock: B): B

Adds a hat block to this host.

Link copied to clipboard
fun addSound(path: Path, name: String): Sound

Adds a sound from a local file.

fun addSound(name: String, dataFormat: String, assetId: String, rate: Int? = null, sampleCount: Int? = null, path: Path? = null): Sound

Adds a sound to the sprite.

Link copied to clipboard

Implements the logic for a custom block procedure.

Link copied to clipboard

Creates an isolated stack of blocks that is not attached to any hat block.

Link copied to clipboard

Creates a local broadcast from a broadcast slot.

Link copied to clipboard

Creates a local list from a list slot.

fun makeList(name: String = IdGenerator.makeRandomId(6), block: JsonArrayBuilder.() -> Unit): ScratchList

Creates a local list for this sprite with a builder.

fun makeList(name: String = IdGenerator.makeRandomId(6), jsonArray: JsonArray): ScratchList

Creates a local list for this sprite.

Link copied to clipboard
fun makeLocalBroadcast(name: String = IdGenerator.makeRandomId(6)): Broadcast

Creates a local broadcast message for this sprite.

Link copied to clipboard
fun makeVar(variableSlot: VariableSlot): Variable

Creates a local variable from a variable slot.

fun makeVar(name: String = IdGenerator.makeRandomId(6), value: JsonPrimitive = JsonPrimitive(""), cloud: Boolean = false): Variable

Creates a local variable for this sprite.

Link copied to clipboard
Link copied to clipboard

Defines a custom block procedure.

Link copied to clipboard
open override fun represent(): Representation
Link copied to clipboard

Configures the builder to use random names for subsequent local variables, lists, and broadcasts.

Link copied to clipboard
operator fun Costume.unaryPlus(): Costume

Adds a costume to this sprite.

operator fun Sound.unaryPlus(): Sound

Adds a sound to this sprite.

Link copied to clipboard

Creates a 'when backdrop switches to' hat block.

Link copied to clipboard

Creates a 'when this sprite clicked' hat block.

Link copied to clipboard

Creates a 'when loudness >' or 'when timer >' hat block.

Link copied to clipboard

Creates a 'when green flag clicked' hat block.

Link copied to clipboard

Creates a 'when I receive' hat block.

Link copied to clipboard

Creates a 'when I start as a clone' hat block.

Link copied to clipboard

Creates a 'when key pressed' hat block.