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 );