zoukankan      html  css  js  c++  java
  • 新随笔

    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;

  • 相关阅读:
    例6-5
    例6-3
    例6-2
    例6-1
    例5-9
    python3
    python3
    python3
    python3
    python3
  • 原文地址:https://www.cnblogs.com/wuyuans/p/4237821.html
Copyright © 2011-2022 走看看