首页 > 代码库 > cocos2dx lua 类型强转

cocos2dx lua 类型强转

 

lua 里,类型强转

 

    local widget = Widget:create()    local node = widget:getWidgetWithName("lab"); --node 类型是:Widget        local button = tolua.cast(node, "Button") -- Widget  类型转为:Button    

 

  

cocos2dx lua 类型强转