| 61 | } |
| 62 | |
| 63 | PromoItemSprite* PromoItemSprite::create(const char* sprite, std::function<void(Node*)> callback) { |
| 64 | PromoItemSprite* pRet = new(std::nothrow) PromoItemSprite(sprite, callback); |
| 65 | |
| 66 | if (pRet && pRet->init()) { |
| 67 | pRet->autorelease(); |
| 68 | return pRet; |
| 69 | } else { |
| 70 | AX_SAFE_DELETE(pRet); |
| 71 | return nullptr; |
| 72 | } |
| 73 | } |