Another new Game topic and more fixes
This commit is contained in:
		
							
								
								
									
										37
									
								
								docs/reference/game/change-sprite-property.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								docs/reference/game/change-sprite-property.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					# Get Sprite Property
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Change the kind of [number](/reference/types/number) you say for a [sprite](/reference/game/create-sprite).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sig
 | 
				
			||||||
 | 
					let item: game.LedSprite = null;
 | 
				
			||||||
 | 
					item.set(LedSpriteProperty.X, 0);
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Parameters
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* the **sprite** you want to change
 | 
				
			||||||
 | 
					* the kind of [number](/reference/types/number) you want to change for the sprite, like
 | 
				
			||||||
 | 
					    * ``x``, how far up or down the sprite is on the screen (`0`-`4`)
 | 
				
			||||||
 | 
					    * ``y``, how far left or right the sprite is on the screen (`0`-`4`)
 | 
				
			||||||
 | 
					    * ``direction``, which way the sprite is pointing (this works the same way as the [turn](/reference/game/turn) function)
 | 
				
			||||||
 | 
					    * ``brightness``, how bright the LED sprite is (this works the same way as the [brightness](/reference/led/brightness) function)
 | 
				
			||||||
 | 
					    * ``blink``, how fast the sprite is blinking (the bigger the number is, the faster the sprite is blinking)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This program makes a sprite on the left side of the screen,
 | 
				
			||||||
 | 
					waits two seconds (2000 milliseconds),
 | 
				
			||||||
 | 
					and then moves it to the middle of the screen.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```blocks
 | 
				
			||||||
 | 
					let ball = game.createSprite(0, 2);
 | 
				
			||||||
 | 
					basic.pause(2000);
 | 
				
			||||||
 | 
					ball.change(LedSpriteProperty.X, 2);
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### See also
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[turn](/reference/game/turn),
 | 
				
			||||||
 | 
					[brightness](/reference/led/brightness),
 | 
				
			||||||
 | 
					[get sprite property](/reference/game/get-sprite-property),
 | 
				
			||||||
 | 
					[set sprite property](/reference/game/set-sprite-property)
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Get Sprite Property
 | 
					# Get Sprite Property
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Find something out about a sprite.
 | 
					Find something out about a [sprite](/reference/game/create-sprite).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sig
 | 
					```sig
 | 
				
			||||||
let item: game.LedSprite = null;
 | 
					let item: game.LedSprite = null;
 | 
				
			||||||
@@ -23,7 +23,7 @@ The [number](/reference/types/number) you asked for.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Example
 | 
					### Example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This program creates a sprite and shows the number of its brightness on the screen. 
 | 
					This program makes a sprite and shows the number of its brightness on the screen. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```blocks
 | 
					```blocks
 | 
				
			||||||
let ball = game.createSprite(0, 2);
 | 
					let ball = game.createSprite(0, 2);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Set Sprite Property
 | 
					# Set Sprite Property
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Make a sprite store the kind of [number](/reference/types/number) you say.
 | 
					Make a [sprite](/reference/game/create-sprite) store the kind of [number](/reference/types/number) you say.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sig
 | 
					```sig
 | 
				
			||||||
let item: game.LedSprite = null;
 | 
					let item: game.LedSprite = null;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user