(NO.00003) iOS games simple robot projection game forming notes (11)

Source: Internet
Author: User

(NO.00003) iOS games simple robot projection game forming notes (11)

The robot has already fired bullets. Let's see how to set obstacles for players.

We can see from the figure above that there are several obstacles in the machine and basket. Let's first look at how to implement them.

Open SpriteBuilder and create SmallBrick. ccb in the Sprites folder. The type is Node.

Drag a CCNodeColor node from the control library, called the child node of its root node. Decorate the appearance according to your preferences and open the physical object. The physical type is static:

Create a new Levels folder and create a Level. ccb file in the folder. The file type is Node. First, drag a physical Node to its root Node.

Drag two robots to the left of the screen. One of the two robots is described above.

Place two obstacles in the center of the screen, and drag the rightmost side of the screen into a basket Node object. Note that these newly added objects are all child nodes of the physical node. The screen layout is similar to the following:

The object layers in Timeline are as follows:

Before you finish, set the code connection for the two robots in the basket: _ basket, _ robot1, _ robot2 for access in the code.

 

Related Article

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.