码迷,mamicode.com
首页 > 其他好文 > 详细

新随笔

时间:2015-01-21 01:22:02      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:

cocos3.3 luabinding详解

1.pyyaml的安装

python -m easyinstall pyyaml

2.cheetahr的安装

3.编写.ini文件

模板 [cocos2dxcustom]

prefix = cocos2dxcustom

targetnamespace = cc

androidheaders = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include

androidflags = -DSIZETDEFINED_

clangheaders = -I%(clangllvmdir)s/lib/clang/3.3/include

clangflags = -nostdinc -x c++ -std=c++11

cocosheaders = -I%(cocosdir)s/cocos -I%(cocosdir)s/my -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/ui -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath -I%(cocosdir)s/extensions -I%(cocosdir)s/external -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s

cocosflags = -DANDROID -DCOCOS2DJAVASCRIPT

cxxgeneratorheaders =

extraarguments = %(androidheaders)s %(clangheaders)s %(cxxgeneratorheaders)s %(cocosheaders)s %(androidflags)s %(clangflags)s %(cocosflags)s %(extraflags)s

headers = %(cocosdir)s/cocos/my/CustomClass.h

classes = CustomClass.*

# regular expressions, they will not be surrounded by "^\)". If you want to skip a whole class, just # add a single "*" as functions. See bellow for several examples. A special class name is "*", which

skip =

renamefunctions =

renameclasses =

removeprefix =

classeshavenoparents =

baseclassestoskip =

abstractclasses =

scriptcontrolcpp = no

4.注册到Lua

LuaStack *stack = engine->getLuaStack(); auto L = stack->getLuaState(); if (L) { luagetglobal(L, "G"); registerallcocos2dxcustom(L); luasettop(L, 0); }

#if (COCOS2DDEBUG>;0) if (startRuntime()) return true; #endif engine->executeScriptFile(ConfigParser::getInstance()->getEntryFile().cstr()); return true;

新随笔

标签:

原文地址:http://www.cnblogs.com/wuyuans/p/4237821.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!