Detailed explanation for COCOS2D-X.ini files

This article mainlyA detailed explanation for the cocos2d.ini file.

When we need to call C++ to customize it, we need to modify a copy of cocos2dx.inicopy. So what are the changes?

In frameworks\cocos2d-x\tools\tolua, make a copy of cocos2dx under this folder. The configuration information of ini, and then modify some parameters, changed to the parameters of our custom class.

[custom_api]

# prefix will be added to the generated function. You can also choose not to add this to your template

prefix = custom_api

# All classes will be embedded in This namespace

target_namespace = my

# The path where the class is located, If there are multiple, separate them with spaces

headers = %(cocosdir)s/../runtime -src/Classes/PanZoomLayer.h

# Need to register the class, if there are more than one, use a space Separate

classes = PanZoomLayer

# Not available to public members of Lua Function

skip = PanZoomLayer::[onTouchesBegan onTouchesMoved onTouchesEnded init onEnter onExit update]

# If these are all empty, it’s OK

rename_functions =

rename_classes =

remove_prefix =

classes_have_no_parents =

base_classes_to_skip =

abstract_classes =

script_control_cpp = no

This article focuses on a detailed explanation of the cocos2d.ini file.

When we need to call C++ to customize it, we need to modify a copy of cocos2dx.inicopy. So what are the changes?

In frameworks\cocos2d-x\tools\tolua, make a copy of cocos2dx under this folder. The configuration information of ini, and then modify some parameters, changed to the parameters of our custom class.

[custom_api]

# prefix will be added to the generated function. You can also choose not to add this to your template

prefix = custom_api

# All classes will be embedded in This namespace

target_namespace = my

# The path where the class is located, if there are multiple , Separated by spaces

headers = %(cocosdir)s/../runtime-src/Classes /PanZoomLayer.h

# Classes that need to be registered, if there are more than one, separate them with spaces

classes = PanZoomLayer

# Public member functions not provided to Lua

skip = PanZoomLayer::[onTouchesBegan onTouchesMoved onTouchesEnded init onEnter onExit update]

# If these are all empty, it’s OK

rename_functions =

rename_classes =

remove_prefix =

classes_have_no_parents =

base_classes_to_skip =

abstract_classes =

script_control_cpp = no

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3711 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.