Cocos3.10 use the cocostudio callback feature c ++ version description, cocostudio callback feature

Source: Internet
Author: User

Cocos3.10 use the cocostudio callback feature c ++ version description, cocostudio callback feature

Cocos3.10 use cocostudio callback feature c ++ version description

 

Cocos2dx hasn't been playing well for a long time. It's really fast to watch the version upgrade again and again. Today, cocos3.10 is used to test the Time Feature and follow the official documentation for a smooth process, the only last step of the Code do not know where to put, the afternoon after dinner back, and look at the official this sentence (official address http://www.cocos.com/doc/article/index? Type = Cocos % 20 Studio & url =/doc/cocos-docs-master // manual/studio/v4/chapter3/HowToCode/CallBack/zh. md), so you can see that it was placed in front of csb and tried it.

 

Here, only some codes are sent. Other codes and official codes can be sent all the time:

 

/// // 1. super init first if (! Layer: init () {return false;} CSLoader * instance = CSLoader: getInstance (); // note that the first parameter must be the custom class name and "Reader" entered in the first step. For example, "MyClassReader" instance-> registReaderObject ("MyClassReader", (ObjectFactory: Instance) myClassReader: getInstance); auto rootNode = CSLoader: createNode ("MainScene. csb "); // addChild (rootNode, 0,100); return true ;}

 

Let's take a look at the problem:

5. Register this interface to CSLoader before loading the Node. // This Node means that you can process the scenario before loading it as a Node.

CSLoader * instance = CSLoader: getInstance (); // note that the first parameter must be the custom class name and "Reader" entered in the first step. For example, "MyClassReader" instance-> registReaderObject ("MyClassReader", (ObjectFactory: Instance) myClassReader: getInstance );

 

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.