第19步:在碰撞事件中,使用 if 语句来测试 lives 是否小于或等于 <= 0 。
- 在 if 语句内,使用 Text in Color (0,0) 展示一条 "red" 的 "GAME OVER!" 。
- 在 if 语句中添加一个 Say 指令。
- 将 .say() 中的字符串更改为 "Your final score was ___"。使用 + 和 str() 将空白替换为 score 的值。
To navigate the page using the TAB key, first press ESC to exit the code editor.