第 8 步:我们的场景设置完毕。好的!现在让我们的游戏具有交互性。

  • 看看你的 micro:bit。注意有两个按钮。找到显示 A 的按钮。
  • 在主题中,单击.然后,将块A Button Press拖到编辑器的底部。
  • 点击运行并在您的 micro:bit 上按 A。你的精灵应该向左移动。

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

microbit = codesters.Microbit() microbit.show_string("hello") stage.set_background("soccerfield") sprite = codesters.Sprite("athlete2") sprite.move_down(150)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)