IOS development chapter -- using cocos2dx to turn cards

Source: Internet
Author: User

Cocos2dx engine development is now the most popular mobile game engine development, which is the climax of students' learning. Seven of the top 10 games that are currently running are developed using the cocos2dx engine, so developers are proud to be involved.

Today's learning content: cocos2dx is used to achieve the card flop effect. cocos2dx has an action to achieve this effect. Let's take a look at it!

650) this. width = 650; "title =" 1.png" src = "http://www.bkjia.com/uploads/allimg/131229/121H36122-0.png" alt = "150153236.png"/>

For an ipad simulator, the frame rate is 30, and the actual frame rate is 60.

The following actions can be used to flip the cards: CCOrbitCamera

650) this. width = 650; "title =" 2.jpg" src = "http://www.bkjia.com/uploads/allimg/131229/121H3H17-1.jpg" alt = "150209706.jpg"/>

For example, the parameters are respectively the rotation time, start radius, radius difference, start z angle, rotation z angle difference, start x angle, rotation x angle difference, if the encapsulation is cardSprite, add it to your project.

Usage:

650) this. width = 650; "title =" Usage:. jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H32255-2.jpg "width =" 505 "height =" 123 "alt =" 150222640.jpg"/>

CardSprite. h

650) this. width = 650; "title =" CardSprite.h.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H3I39-3.jpg "width =" 508 "height =" 493 "alt =" 1501_855.jpg"/> 650) this. width = 650; "title =" CardSprite.h1.h.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H3DJ-4.jpg "alt =" 150434131.jpg"/>

CardSprite. cpp

650) this. width = 650; "title =" CardSprite.cpp.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H31134-5.jpg "alt =" 150448858.jpg"/> 650) this. width = 650; "title =" CardSprite.cpp1.cpp.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H311X-6.jpg "alt =" 150459278.jpg"/> 650) this. width = 650; "title =" CardSprite.cpp2.cpp.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H32634-7.jpg "alt =" 150524880.jpg"/> 650) this. width = 650; "title =" CardSprite.cpp3.cpp.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H31X5-8.jpg "alt =" 150535617.jpg"/> 650) this. width = 650; "title =" CardSprite.cpp4.cpp.jpg "src =" http://www.bkjia.com/uploads/allimg/131229/121H32U4-9.jpg "alt =" 150546163.jpg"/>

The above is all the content of this lesson, and the program is a bit messy. If you do not understand anything, you can break through the O at any time.

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.