Code Monkey home page Code Monkey logo

Comments (7)

shawnclovie avatar shawnclovie commented on August 19, 2024

Lua中不能使用Custom class,所以请将那里设成空,把要使用的节点设定成Owner var并起名就好。
昨天修改的CCBProxy.cpp已经不再调用registerCCNodeLoader,之前这步操作完全没起作用。

from cocos2dx-luaproxy.

aquariusgx avatar aquariusgx commented on August 19, 2024

多谢~

from cocos2dx-luaproxy.

wtyqm avatar wtyqm commented on August 19, 2024

关于CocosBuilder lua bind的方式,我觉得官方js bind那种,一个interface对应一个脚本文件,自动将成员变量绑定到脚本里,在正规使用上有一定优势,同时也支持Custom class。我这里也写了个lua的对应实现。
不知您有没有想法包含这种方式?

from cocos2dx-luaproxy.

dumganhar avatar dumganhar commented on August 19, 2024

@wtyqm
What do you think about https://github.com/cocos2d/cocos2d-x/blob/master/scripting/lua/script/CCBReaderLoad.lua ?

from cocos2dx-luaproxy.

wtyqm avatar wtyqm commented on August 19, 2024

@dumganhar
Very good, and thank for your remind.Is it publish in cocos2dx-2.1.4 ?
What about auto convert member variable type and custom property? I think this should add support in cocosbuilder cpp file.

from cocos2dx-luaproxy.

wtyqm avatar wtyqm commented on August 19, 2024

@dumganhar
Oh, it's already support auto convert member variable type. Is it still ok for sub ccb file type ? And the second param proxy is LuaProxy ?

from cocos2dx-luaproxy.

shawnclovie avatar shawnclovie commented on August 19, 2024

There are different way to do same thing. Just pick which one that fit you.

Do more in C++ should more effective, I think. So I do more with C functions.
Every ccbi for LuaProxy, just like texture for CCSprite.

from cocos2dx-luaproxy.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.