Return to Video

Minecraft Hour of Code: Events

  • 0:00 - 0:05
    编码时间 我的世界 | 事件
  • 0:05 - 0:10
    在接下来这一关中,您可以选择
    扮演史蒂夫或艾莉克斯。
  • 0:10 - 0:17
    按下键盘上的方向键可以
    上下左右移动。
  • 0:17 - 0:21
    现在您可以在一个关卡中
    随意移动。
  • 0:21 - 0:27
    要使用生物,只要走到它面前,
    面对它按空格即可。
  • 0:27 - 0:34
    如果您用的是触摸屏,上下左右扫动
    即可四处移动。
  • 0:34 - 0:39
    然后轻按游戏,使用您前面的
    物品。
  • 0:39 - 0:41
    不过您使用它时会发生什么?
  • 0:41 - 0:47
    在 我的世界 中,当您修剪羊时,
    它们会掉落羊毛,当您击中牛时,它们会跑开,
  • 0:47 - 0:51
    当您接近爬行者时,它们会爆炸。
  • 0:51 - 0:55
    正因为有这些称之为事件的东西,
    这些反应才得以发生。
  • 0:55 - 1:00
    事件会告诉您的程序倾听或等待
    某件事情发生。
  • 1:00 - 1:03
    当它来临时,便执行一种行为。
  • 1:03 - 1:08
    到目前为止,您已经用过一次事件。您在
    "当生成时" 栏中放入的代码,
  • 1:08 - 1:12
    会在有生物生成或游戏开始时运行。
  • 1:12 - 1:18
    在随后几关中,您会遇到新的事件栏,
    比如 "当触摸时" 会在
  • 1:18 - 1:23
    您触摸生物时运行,或 "当使用时"
    会在您使用生物时运行。
  • 1:23 - 1:30
    或者,如果您想让僵尸在太阳出来后消失,
    就将它放入 "当白天时" 栏中
Title:
Minecraft Hour of Code: Events
Description:

Start learning at http://code.org/

Stay in touch with us!
• on Twitter https://twitter.com/codeorg
• on Facebook https://www.facebook.com/Code.org
• on Instagram https://instagram.com/codeorg
• on Tumblr https://blog.code.org
• on LinkedIn https://www.linkedin.com/company/code-org
• on Google+ https://google.com/+codeorg

more » « less
Video Language:
English
Team:
Code.org
Project:
Hour of Code
Duration:
01:32

Chinese, Simplified subtitles

Revisions