2016-03-26 00:47:20 +01:00
|
|
|
# Reports
|
|
|
|
|
|
|
|
The game library
|
|
|
|
|
|
|
|
### Reports
|
|
|
|
|
|
|
|
Reports the x or y position, the current direction of a sprite, or the brightness 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)
|
|
|
|
|
|
|
|
Reports the y position of a sprite on the LED screen
|
|
|
|
|
|
|
|
![](/static/mb/game-library/reports-0.jpg)
|
|
|
|
|
|
|
|
Reports the brightness of a sprite on the LED screen
|
|
|
|
|
|
|
|
![](/static/mb/game-library/reports-1.jpg)
|
|
|
|
|
|
|
|
Reports the direction of a sprite on the LED screen
|
|
|
|
|
|
|
|
![](/static/mb/game-library/reports-2.jpg)
|
|
|
|
|
|
|
|
## 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
|
|
|
|
```
|
|
|
|
|
|
|
|
Reports the brightness of a sprite on the LED screen
|
|
|
|
|
|
|
|
```
|
|
|
|
export function brightness(_this: micro_bitSprites.LedSprite) : number
|
|
|
|
```
|
|
|
|
|
|
|
|
Reports the current direction of a sprite on the LED screen
|
|
|
|
|
|
|
|
```
|
|
|
|
export function direction(_this: micro_bitSprites.LedSprite) : number
|
|
|
|
```
|
|
|
|
|
|
|
|
### Lessons
|
|
|
|
|
2016-04-13 17:27:45 +02:00
|
|
|
[game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
2016-03-26 00:47:20 +01:00
|
|
|
|