让我们加入精灵控件。

  • 添加 Left KeyRight KeyUp KeyDown Key 让你的精灵上下移动。
  • 将一个 Collision with Other Sprite 拖动到你的事件内部。
  • Global Variable 拖动到碰撞事件中。将变量更改为 recycle_xp
  • my_var 更改为 litter。更改 if 语句以测试 litter 是否在 recycle 列表。

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)