Example #1
0
HelloWorld* HelloWorld::create(PhysicsWorld* world,int level)
{
	HelloWorld* pRet = new HelloWorld();
	if (pRet && pRet->init(world,level)){
		pRet->autorelease();
		return pRet;
	}
	delete pRet;
	pRet = NULL;
	return NULL;
}
HelloWorld* HelloWorld::create() 
{ 
	HelloWorld* pRet = new HelloWorld(); 
	
	if (pRet && pRet->init()) 
	{ 
		pRet->autorelease();
		return pRet;
	}

	return NULL;
} 
Example #3
0
HelloWorld* HelloWorld::create() \
{ \
    HelloWorld *pRet = new HelloWorld(); \
    if (pRet && pRet->init()) \
    { \
        pRet->autorelease(); \
        return pRet; \
    } \
    else \
    { \
        delete pRet; \
        pRet = NULL; \
        return NULL; \
    } \
}