it run in helloworld
sotre Scene point whicth now working
@ static cocos2d::CCScene* p_nowSence;@
@
//将scence指针存放
HelloWorld::p_nowSence = scene;
@
statement this static modeth to add new CSprite
@ //多线程添加layer的方法
static void addNewNode(cocos2d::CCSprite* node);
@
about thread
@ if( pthread_create(&pid,NULL,start_thread,(void *)p) != 0 )
{
return NULL;
}
@
add sprite thread modeth
`void* ThreadUtils::start_thread(void * arg)
{
CCSprite* sp = MySprite::create();
(reinterpret_cast<MySprite*>(sp))->load();
HelloWorld::addNewNode(sp);
return arg;
}
`
but it no show
if add in HelloWorld::init() it work pasd!