第 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)