logo

Crowdly

Browser

Додати до Chrome

In a Flappy Bird game, the bird’s vertical position is tracked by birdY, and isF...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

In a Flappy Bird game, the bird’s vertical position is tracked by birdY, and isFlapping is a variable that prevents the bird from flapping again while it is still rising. Given the following code snippet, what happens when the spacebar is pressed while the bird is falling?

if (birdY > 300) {

  isFlapping = false;

}

if (keyIsPressed && key == " " && !isFlapping) {

  velocityY = -12;

  isFlapping = true;

  flap.play();

}

0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на elearning.aua.am?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome