第8步:让我们继续捡起控制台上的东西!

  • 运行 程序以查看控制台上的雪花!
  • 点击 ,将 Glide To 拖动到程序底部。
  • 更改 .glide_to() 指令中的坐标,使精灵达到雪花!
  • 记住,坐标是 x 坐标在前 y 坐标在后的,就像这样:(x,y)。

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(5, -6) def collision(sprite, hit_sprite): hit_sprite.hide() # add any other actions... sprite.event_collision(collision)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)