cocos2dx3.x lua binding

ios的lua binding

详见参考:http://www.cocos2d-x.org/docs/manual/code-ide/binding-custom-class-to-lua/en

 

android的lua binding

 1.在my文件夹中添加Android.mk文件,如下内容

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
 
LOCAL_MODULE := cocos_custom_static
 
LOCAL_MODULE_FILENAME := libmy
 
LOCAL_SRC_FILES := \
HNLuaTest.cpp
 
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)./
 
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)./
 
LOCAL_CFLAGS += -Wno-psabi
LOCAL_EXPORT_CFLAGS += -Wno-psabi
 
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
 
include $(BUILD_STATIC_LIBRARY)
 
$(call import-module,.)

 2 打开lua-bindings文件夹的Android.mk文件,添加以下内容

LOCAL_SRC_FILES := manual/CCLuaBridge.cpp \
                            #省略
                            auto/lua_cocos2dx_custom_auto.cpp \
                            ../../../external/lua/tolua/tolua_event.c \
                            #省略

 
cocos2dx3.x lua binding_第1张图片
 

你可能感兴趣的:(cocos2dx)