moveUpKey

fun Sprite2D.moveUpKey(key: Key, speed: Double = 1.0)

Moves the sprite up when the given key is pressed.

Parameters

key

The key to check.

speed

The speed to move the sprite.