当刺猬和球碰撞时,我们希望 player1 击球过网。

  • Collision with Shape 添加到你的程序。将事件处理器开始处的名称更改为 player1
  • 更改第一个 if 语句以测试与 "blue"的碰撞。删除第二个 if 语句及其指令。
  • 将第一个 if 语句下的指令更改为 .set_x_speed(),将 hit_sprite 的 x 速度设置为 4
  • 在相同的 if 语句下,添加另一个指令 .set_y_speed() ,将 hit_sprite 的 y 速度设置为 5

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)