第4步:在这个活动中,我们将添加一个文本对象。 默认情况下,它的名字是 sprite ,和我们的主角一样。

  • 点击 并拖出 Text in Color。
  • 将 = 前面的名称更改为 text。现在,控制台上的两个物体都有唯一的名字了!
  • 运行 你的程序以查看文本出现。

代码上方的灰色文本称为注释。计算机不读取注释。注释只描述代码。

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

stage.set_background("park")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)