我们的主角必须跳过敌人以躲避它们。我们将使用空格键来进行操作。

  • 添加一个 Space Bar 事件,让玩家能够使主角进行跳跃。
  • 点击 ,拖出 Set x Speed。将名称更改为 snake
  • Random Integer 拖动到括号内部,并选择速度的范围。
  • 点击 Sprite Gravity On。将名称更改为 snake。对其他两个敌人重复这些步骤。

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)