???????????????tolua++????????C++???????lua??????
???????????
??????????? -> ???tolua++???????LuaCoco2d.cpp?? -> lua????
???????????????????C++?????????????????MySprite
????MySprite.h

????MySprite.cpp

???????????????????????????.pkg????????????????MySprite???嵽.pkg?????
???????1>?????????????.h?е??????????.cpp??????binding??lua???????????????
????2>????д.pkg???????????????????tolua++??????????README???
????1. Generating the lua<-->C bindings with tolua++
????Build scripts for windows (build.bat) and unix (build.sh) are provided
????to generate the relevant files after modifying the .pkg files. These
????scripts basically run the following command:
????tolua++.exe -L basic.lua -o LuaCocos2d.cpp Cocos2d.pkg
????This will generate the bindings file and patch it with come cocos2dx
????specific modifications.
????On POSIX systems you can also just run "make" to build the bindings
????if/when you change .pkg files.
????2. Writing .pkg files
????1) enum keeps the same
????2) remove CC_DLL for the class defines?? pay attention to multi inherites
????3) remove inline keyword for declaration and implementation
????4) remove public protect and private
????5) remove the decalration of class member variable
????6) keep static keyword
????7) remove memeber functions that declared as private or protected
??????????.pkg??????????д????
???????????????д???MySprite.pkg????????????£?
????class MySprite : public CCSprite{
????static MySprite * createMS(const char * fileName);
????}
??????д???????.pkg???????????????tolua++????????????
????????????????tolua++???????tolua++????????д??.pkg?????????????????LuaCocos2d.cpp??
??????????tolua++??????????tolua++.Mac.zip??????????????????tolua++???????????

????????????????????????tolua++??·??????Xcode??build.sh??????????????????