Scratch for Java

Window::setGameSpeed()

Makes the game run slower or faster: 1 is normal, 0.5 half as fast, 2 twice as fast. run(), timers, gliding and animations all follow, so the whole game looks like slow motion; the window keeps drawing smoothly.

Examples

View on GitHub

Syntax

Java

.setGameSpeed(speed)

Parameters

Name Data Type Description
speed double 1 for normal speed, smaller for slower, larger for faster

Return

void

setGameSpeed()

Create Shareable URL

Select Sections