Scratch Game Program Learning Method-Pick Apple (10) Catch Apple _scratch

Source: Internet
Author: User
Key knowledge of this chapter


-whether the role encounters the specified role (or edge, or mouse), and if so, return true.

Click on the black triangle of the building block module to select another role



--Play sound

Play selected sounds



In the previous chapter, the bowl was moved around,

In this chapter, we come to realize that when the bowl catches the apple (the Apple falls into contact with the bowl)

Let the Apple go back to the top and continue to fall



Operational steps: Step one: Select the role to be programmed

We chose to return to the Apple role

When the role is selected, you can program the role in the script area by clicking on the Script tab



Step Two: Find the following block blocks



Step three: Start dragging the building block module

Drag to set the building block module as follows



Complete

The last building block should be the same as the legend below (the new building blocks are added in the red box)



Test

As on the program, I click on the Green Flag button.

First of all, Apple will be randomly at the top of the show, began to fall down

Press the keyboard direction key left or right, you can control the bowl move around

When the Apple falls and touches the bowl,

Makes a sound, and then the Apple continues to drop randomly on it.


The legend has not been able to express such a fun game, you have to try it quickly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.