步骤5:我们再向 bridge_scene 添加一些动作!

确保两个动作都进入你的 bridge_scene 函数内部。

  • 让精灵 Go To(-175, -150)的位置。
  • 让精灵 Say "I made it!"

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

sprite = codesters.Sprite("knight1", -175, -150) sprite.set_speed(2) def park_scene(): stage.set_background("park") sprite.say("I should hurry to the castle!") sprite.move_forward(550) park_scene() def bridge_scene(): stage.set_background("drawbridge")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)