Esempio n. 1
0
Poker* Poker::create(const char *pszFileName, const CCRect& rect){
	Poker* pk = new Poker();
	if (pk && pk->initWithFile(pszFileName,rect))
	{
		pk->autorelease();
		return pk;
	}
	CC_SAFE_DELETE(pk);
	return pk;
}
Esempio n. 2
0
//============================ Poker  =============================
Poker * Poker::create(pokerColor color, int number){
	Poker* poker = new Poker();

	if (poker && poker->init(color, number))
	{
		poker->autorelease();
        poker->retain();
        
		return poker;
	}
	CC_SAFE_DELETE(poker);
	return nullptr;
}