Turn

Turn the sprite as much as you say in the direction you say.

let item: game.LedSprite = null;
item.turn(Direction.Right, 45);

Parameters

Example

This program starts a sprite in the middle of the screen. Next, the sprite turns toward the lower-right corner. Finally, it moves two LEDs away to the corner.

let item = game.createSprite(2, 2);
item.turn(Direction.Right, 45);
item.move(2);

See also

move, create sprite

Edit this page on GitHub