hiding the was pressed block (#401)

This commit is contained in:
Peli de Halleux
2018-04-03 04:10:35 -07:00
committed by GitHub
parent 6c626f9c98
commit c0413aa192
10 changed files with 14 additions and 12 deletions

View File

@ -22,7 +22,7 @@ Play some motor sounds if touch sensor `1` is pressed at the same moment when an
```blocks
while (true) {
if (sensors.touch1.wasPressed() &&
if (sensors.touch1.isPressed() &&
sensors.ultrasonic4.distance() < 10) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
@ -38,8 +38,8 @@ Play some motor sounds if touch sensor `1` is pressed when both the `enter` butt
```blocks
while (true) {
if (sensors.ultrasonic4.distance() < 10 &&
sensors.touch1.wasPressed() &&
brick.buttonEnter.wasPressed()) {
sensors.touch1.isPressed() &&
brick.buttonEnter.isPressed()) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}