第 5 步:哎呀! Glide To 命令让我们的精灵一路走下舞台!让我们改变坐标,让我们的精灵滑向帽子!在本课中,我们的舞台在 x 轴和 y 轴上从 -8 变为 8。

  • 点击跑去看看舞台上的帽子。
  • 代码编辑器中单击并将.glide_to() command to ( 5 , -6 ).
  • .glide_to()命令中的数字是精灵滑行到的坐标对。

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

stage.set_background("winter") sprite = codesters.Sprite("snowman") sprite.set_size(.5) sprite.pen_down() sprite.glide_to(-100, 50)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)