Update SUMMARY with current reference APIs. (#507)

This commit is contained in:
Galen Nickel
2017-08-10 17:52:43 -07:00
committed by Peli de Halleux
parent bed48e3893
commit 17886f3365
16 changed files with 142 additions and 46 deletions

View File

@ -36,9 +36,9 @@ game.resume();
### See also
[createSprite](/reference/game/create-sprite), [move](/reference/game/move), [turn](/reference/game/turn),
[create sprite](/reference/game/create-sprite), [move](/reference/game/move), [turn](/reference/game/turn),
[ifOnEdgeBounce](/reference/game/if-on-edge-bounce), [get](/reference/game/get), [set](/reference/game/set),
[change](/reference/game/change), [isTouching](/reference/game/touching) [isTouchingEdge](/reference/game/touching-edge),
[addScore](/reference/game/change-score-by), [score](/reference/game/score), [setScore](/reference/game/set-score),
[startCountdown](/reference/game/start-countdown), [gameOver](/reference/game/game-over),
[change](/reference/game/change), [is touching](/reference/game/is-touching) [is touching edge](/reference/game/is-touching-edge),
[add score](/reference/game/add-score), [score](/reference/game/score), [set score](/reference/game/set-score),
[start countdown](/reference/game/start-countdown), [game over](/reference/game/game-over),
[pause](/reference/game/pause), [resume](/reference/game/resume)

View File

@ -0,0 +1,30 @@
# add Score
Add more to the current score for the game.
```sig
game.addScore(1)
```
### Parameters
* a [number](/types/number) that means how much to add to the score. A negative number means to subtract from the score.
### Examples
This program is a simple game.
Press button ``A`` as much as possible to increase the score.
Press ``B`` to display the score and reset the score.
```blocks
input.onButtonPressed(Button.B, () => {
basic.showNumber(game.score())
game.setScore(0)
})
input.onButtonPressed(Button.A, () => {
game.addScore(1)
})
```
### See Also
[score](/reference/game/score), [set score](/reference/game/set-score), [start countdown](/reference/game/start-countdown)

View File

@ -1,27 +0,0 @@
# Change Score By
Add the amount you say to the score for the game.
```sig
game.addScore(1)
```
### Parameters
* a [number](/types/number) that means how much to add to the score. A negative number means to subtract from the score.
### Examples
This program is a simple game.
Press button ``A`` as much as possible.
At the end of 10 seconds, the program will show your score.
```blocks
input.onButtonPressed(Button.A, () => {
game.addScore(1)
})
game.startCountdown(10000)
```
### See Also
[score](/reference/game/score), [start countdown](/reference/game/start-countdown)

View File

@ -33,5 +33,5 @@ ball.change(LedSpriteProperty.X, 2);
[turn](/reference/game/turn),
[brightness](/reference/led/brightness),
[get sprite property](/reference/game/get-sprite-property),
[set sprite property](/reference/game/set-sprite-property)
[get sprite property](/reference/game/get),
[set sprite property](/reference/game/set)

View File

@ -33,5 +33,5 @@ item.move(2);
[move](/reference/game/move),
[turn](/reference/game/turn),
[touching](/reference/game/touching)
[is-touching](/reference/game/is-touching)

View File

@ -0,0 +1,26 @@
# delete
Delete a sprite from the game.
```sig
let item: game.LedSprite = null;
item.delete();
```
### Parameters
* the **sprite** you want to delete from the game
### Example
This program makes a sprite and shows the number of its brightness on the screen. Then, it deletes the sprite.
```blocks
let ball = game.createSprite(0, 2);
basic.showNumber(ball.get(LedSpriteProperty.Brightness));
ball.delete();
```
### See also
[create sprite](/reference/game/create-sprite)

View File

@ -25,4 +25,4 @@ input.onButtonPressed(Button.B, () => {
### See Also
[score](/reference/game/score),
[change score by](/reference/game/change-score-by), [start countdown](/reference/game/start-countdown)
[add score](/reference/game/add-score), [start countdown](/reference/game/start-countdown)

View File

@ -34,6 +34,6 @@ basic.showNumber(ball.get(LedSpriteProperty.Brightness));
[turn](/reference/game/turn),
[brightness](/reference/led/brightness),
[change sprite property](/reference/game/change-sprite-property),
[set sprite property](/reference/game/set-sprite-property)
[change sprite property](/reference/game/change),
[set sprite property](/reference/game/set)

View File

@ -30,5 +30,5 @@ input.onButtonPressed(Button.B, () => {
### See also
[create sprite](/reference/game/create-sprite),
[touching](/reference/game/touching),
[touching edge](/reference/game/touching-edge)
[is touching](/reference/game/is-touching),
[is touching edge](/reference/game/is-touching-edge)

View File

@ -36,5 +36,5 @@ if (item.isTouchingEdge()) {
### See also
[create sprite](/reference/game/create-sprite),
[touching](/reference/game/touching),
[is touching](/reference/game/is-touching),
[if on edge, bounce](/reference/game/if-on-edge-bounce)

View File

@ -37,5 +37,5 @@ if (matter.isTouching(antimatter)) {
### See also
[create sprite](/reference/game/create-sprite),
[touching edge](/reference/game/touching-edge),
[is touching edge](/reference/game/is-touching-edge),
[if on edge, bounce](/reference/game/if-on-edge-bounce)

View File

@ -27,4 +27,4 @@ input.onButtonPressed(Button.A, () => {
### See Also
[score](/reference/game/score), [start countdown](/reference/game/start-countdown)
[score](/reference/game/score), [add score](/reference/game/add-score), [start countdown](/reference/game/start-countdown)

View File

@ -33,5 +33,5 @@ ball.set(LedSpriteProperty.X, 4);
[turn](/reference/game/turn),
[brightness](/reference/led/brightness),
[change sprite property](/reference/game/change-sprite-property),
[get sprite property](/reference/game/get-sprite-property)
[change sprite property](/reference/game/change),
[get sprite property](/reference/game/get)

View File

@ -25,5 +25,5 @@ game.startCountdown(10000)
### See Also
[score](/reference/game/score), [change score by](/reference/game/change-score-by)
[score](/reference/game/score), [add score](/reference/game/add-score)