让我们使用间隔事件使垃圾出现在控制台上的随机位置。

  • 使用 Interval Event 开始污染控制台。将间隔更改为 1
  • 在事件内部,添加 Global Variable ,并将变量更改为 timer
  • 使用两个 Random Integer 指令,在事件内部创建两个名为 xy 的随机值。
  • x 的参数设置为 -225225 ,将 y 的参数设置为 -225 0 ,让垃圾只出现在地面上。

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)