add pause after addScore (#413)
It's necessary to add a pause after addScore in order to display showNumber and showString based on this ticket: https://github.com/Microsoft/pxt/issues/2280
This commit is contained in:
parent
1a58376768
commit
8a2d46d447
@ -166,11 +166,12 @@ input.onButtonPressed(Button.A, () => {
|
|||||||
|
|
||||||
## Step 6: Prove you're the greatest!
|
## Step 6: Prove you're the greatest!
|
||||||
|
|
||||||
After your @boardname@ can add `1` to the score, show how many wins you have.
|
After your @boardname@ can add `1` to the score, show how many wins you have. Remember to add a pause after addScore so text will display.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
input.onButtonPressed(Button.A, () => {
|
input.onButtonPressed(Button.A, () => {
|
||||||
game.addScore(1)
|
game.addScore(1)
|
||||||
|
basic.pause(1)
|
||||||
basic.showString("WINS:")
|
basic.showString("WINS:")
|
||||||
basic.showNumber(game.score())
|
basic.showNumber(game.score())
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user