天天看点

COCOS2DX-LUA 脚本开发之六利用Lua强转函数解决使用CCNode报错

1

2

CCSprite* sp = (CCSprite*)node->getChildByTag(x); 

CCLayer* layer = (CCLayer*)node->getChildByTag(x)

  1. local sp = node:getChildByTag(x) 
  2. local layer =node:getChildByTag(x)

复制代码