pxt-calliope/docs/reference/game/position.md

33 lines
604 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Position
The game library
### Create sprite
Reports the x or y position of a sprite on the LED screen
## Block Editor
Reports the x position of a sprite on the LED screen
![](/static/mb/game-library/position-0.png)
## KindScript
Reports the x position of a sprite on the LED screen
```
export function x(_this: micro_bitSprites.LedSprite) : number
```
Reports the y position of a sprite on the LED screen
```
export function y(_this: micro_bitSprites.LedSprite) : number
```
### Lessons
[game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)