[Cocos2d-x Study Notes] Director, scene, layer, Genie Model

Source: Internet
Author: User

Ccdirector Director

Singleton class, get the Director object through the ccdirector: shareddirefunction

Ccdirector * D = new ccdirector () // error. The singleton object should not be created by yourself.

 

1) The director is responsible for initializing the environment

2) The director is responsible for driving the game process runwithscene, replacescene, pushscene, and popscene.

3) the Director is responsible for Coordinate Transformation

 

Ccscene scenario: A scene is collected from the cocos2dx data structure. It is the root node of a rendering tree at any time. Only one scene is a container in the running scenario.

 

Cclayer: logically divides the containers of game elements, and requires certain mobile functions, some elements must be combined in one layer. The response of the human-computer interaction interface is completed by the cclayer (implemented by virtual functions). Generally, the cclayer class is derived from the cclayer to add code, rendering game elements

 

Ccsprite genie are mainly used to reflect the object of game elements

 

------ In Game Design ----- A Game generally consists of multiple scenarios

Welcome scenario --- menu scenario --- game scenario --- failed scene animation scenario

| -------- Level2 scenario ------------------ point list

[Cocos2d-x Study Notes] Director, scene, layer, Genie Model

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.