Recently, i design a new lua binding layer for cocos2dx, and it controls life cycle of c++ object by lua gc.
Feature:
- manage c++ object by lua gc, it more friendly to developer.
- the exported lua binding code is more simple and efficient.
- support more lambda function binding(schedule, scheduleOnce, …).
- support more api for spine, fairygui, dragonbose.
- the binding layer is more simple then tolua++.
The below code it is safety for cocos-lua, and not safety for cocos2d-x official lua binding.
local sprite = cc.Sprite:create()
local funtion update(dt)
sprite:setFlippedY(true)
end
see more detail: https://github.com/zhongfq/cocos-lua