第14步:现在我们将进行设置,当点击小丑鱼时会扣除玩家的分数。
- 使用 if 测试 sprite_img 的值是否为 "fish1"。将它放在点击事件中,所以它带有一个 ····。
- 在 if 语句中,使用 Subtract Value 从 score 的值中减去 1。
- 在事件内部(但在 if 语句外),使用 Update Display 以在 score_board 显示中更新 score 。
To navigate the page using the TAB key, first press ESC to exit the code editor.