第16步:首先,我们将使用草坪的颜色,测试与汽车相撞的 hit_sprite 是否是草坪。
- 删除碰撞事件中的第二个 if 语句和事件中的两个 say 指令。
- 将存储 get_color() 的变量重命名为 color。
- 在事件中更改第一个 if 语句,以测试 color 是否等于 "lightgreen"。
- 如果颜色为 "lightgreen" 则使用 Go To 将 sprite 发送回起始位置 (0,-200) 。
To navigate the page using the TAB key, first press ESC to exit the code editor.