Compilation of Cocos2D-x authoritative guide Lori run encountered some problems

Source: Internet
Author: User

With the previous compilation experience of the meow Star War, we basically compiled Lori quickly. The Code was a little bit preliminary, and there was nothing very advanced!

I have a few questions, but I still don't quite understand them!

1: when switching scene animation, why ccdirector: shareddirector ()-> setdepthtest (true); turn off the deep test and turn it on again, and there is no big change in removing it!

2: When performing a hero collision detection,

Ccrect gameobjhero: rect ()
{
Ccsize S = ccsizemake (8, 90 );
Return ccrectmake (-S. width/2,-S. Height/2, S. Width, S. Height );
}

Why is the starting point of the hero rectangle (-S. width/2,-S. Height/2.

Is it true that the default anchor is 0.5, 0.5, and the texture coordinate origin is in the lower left, and the texture coordinate origin is in the upper left, so the center point relative to the hero matrix is) the coordinates in the upper left corner of the coordinates are (-s. width/2,-s. height/2 );

The following is how Lori runs. All the files are in

Vs2010 + cocos2d-x 2.14

Http://download.csdn.net/detail/liying426/5894697

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.