第18步:对于这个游戏,我们的获胜条件是到达一片荷叶,所以让我们在碰撞事件中进行设置。

  • 更改 if 语句,以测试图像是否等于 "lilypad"
  • if 语句内部删除默认的 .say() 指令。
  • 使用 Set Text 在 if 语句内部将 result_text 设置为 "YOU WON!"
  • 使用 Set Color 在 if 语句内部将 result_text 的颜色设置为 "green"

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

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)