Cocos2d-x 3.5 about Console Module

Source: Internet
Author: User

Cocos2d-x 3.5 about Console Module
Cocos2d-x engine development is increasingly complete, update a lot of gadgets. This Console module is a Console debugging tool that can be used for remote debugging. Check the code in AppDelegate. cpp.

// Enable Remote Console auto console = director-> getConsole (); console-> listenOnTCP (5678 );
Well, the client only needs to listen to one port, and the port number is customized. Then run the program. If you use an ios device, make sure that the computer and mobile phone are in the same network segment. Otherwise, the device cannot be connected. Open a terminal on your computer and run the following command:
Nc ip 5678

In this way, the device is connected. The Console module has some built-in commands. You can view the commands by running help.

Try the command <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4NCjxwcmUgY2xhc3M9 "brush: java;"> Fps off

Then you can see that the fps information on the device is gone.

If there are only a few built-in commands that are obviously not enough, you can develop some commands for your own game to add them, such as invincible, accelerated or something. I will talk about this later.

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.