batch replace onButtonPressed(Button...
This commit is contained in:
@ -15,7 +15,7 @@ The code below shows a simple game where the user gets to press the button ``A``
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
|
||||
|
||||
```
|
||||
input.onButtonPressed("A", () => {
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
game.addScore(1)
|
||||
})
|
||||
game.startCountdown(10000)
|
||||
|
@ -27,7 +27,7 @@ let img = images.createImage(`
|
||||
. . . . .
|
||||
`)
|
||||
img.showImage(0)
|
||||
input.onButtonPressed("A", () => {
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
img.clear()
|
||||
img.showImage(0)
|
||||
})
|
||||
|
@ -13,7 +13,7 @@ The game library supports simple single-player time-based games. The player has
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
|
||||
|
||||
```
|
||||
input.onButtonPressed("A", () => {
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
game.addScore(1)
|
||||
})
|
||||
game.startCountdown(10000)
|
||||
|
@ -15,7 +15,7 @@ The code below shows a simple game where the user gets to press the button ``A``
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
|
||||
|
||||
```
|
||||
input.onButtonPressed("A", () => {
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
game.addScore(1)
|
||||
})
|
||||
game.startCountdown(10000)
|
||||
|
@ -13,7 +13,7 @@ The game library supports simple single-player time-based games. The general goa
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
|
||||
|
||||
```
|
||||
input.onButtonPressed("A", () => {
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
game.addScore(1)
|
||||
})
|
||||
game.startCountdown(10000)
|
||||
|
Reference in New Issue
Block a user