Star Wars with Blockly - Hour of Code: Events
-
0:00 - 0:05Well, hello, my name is Charita Carter. I'm
a senior creative producer here at Walt Disney -
0:05 - 0:10Imagineering. I'm responsible for leading
teams that actually produce the attractions -
0:10 - 0:17that our guests get to experience. We are
always looking for ways that we can improve -
0:17 - 0:21and make a better experience for our guests
and technology is at the heart of that. -
0:21 - 0:28Congratulations, you did it! You programmed
BB-8. Now I think we're ready for something -
0:28 - 0:33harder. Let's go for it. Now that you've learned
the basics of programming, we're going to -
0:33 - 0:40back in time to build your own game, starring
R2-D2 and C3PO. To make a game, we need to -
0:40 - 0:46learn about something that game programmers
use every day: they're called events. -
0:46 - 0:51Events tell your program to listen or wait
for when something happens and then when it -
0:51 - 0:57does, it performs an action. Some examples
of events are listening for a mouse click, -
0:57 - 1:03an arrow button or a tap on the screen. Here
we're going to make R2-D2 move up to deliver -
1:03 - 1:07a message to a rebel pilot and then move down
to the other rebel pilot. -
1:07 - 1:13We'll use events to make him move. When the
player uses the up/down arrow keys, or the -
1:13 - 1:20up/down buttons. We use the when up event
block and attach the go up block to it. When -
1:20 - 1:25the player presses the up arrow key, the code
attached to the when up block is run. And -
1:25 - 1:29we'll do the same thing to make R2-D2 move
down. -
1:29 - 1:35Now instead of writing all the code to control
our droid in advance, we can let R2-D2 react -
1:35 - 1:41to button press events that move him around
the screen. Step by step, your game is getting -
1:41 - 1:43more interactive.
- Title:
- Star Wars with Blockly - 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 - Video Language:
- English
- Team:
- Code.org
- Project:
- Hour of Code
- Duration:
- 01:48
Code.org edited English subtitles for Star Wars with Blockly - Hour of Code: Events |