第 5 步:让我们为每条腿精灵设置 y 位置,以便机器人站在月球上!

我们使用一个变量作为我们的 x 坐标,因为我们需要它在每次循环运行时改变(改变)。

  • 将腿部精灵的 y 坐标从0更改为-150
  • 让我们更新我们的显示以查看legs_x的变化!从,在循环内拖动Update Display
  • .update()括号中的变量参数从my_varlegs_x

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)