Exemplo n.º 1
0
CCSpriteEx* CCSpriteEx::createWithSpriteFrame(CCSpriteFrame *pSpriteFrame)
{
    CCSpriteEx *pobSprite = new CCSpriteEx();
    if (pSpriteFrame && pobSprite && pobSprite->initWithSpriteFrame(pSpriteFrame))
    {
        pobSprite->autorelease();
        return pobSprite;
    }
    CC_SAFE_DELETE(pobSprite);
    return NULL;
}
Exemplo n.º 2
0
CCSpriteEx* CCSpriteEx::createWithTexture(CCTexture2D *pTexture, const CCRect& rect)
{
    CCSpriteEx *pobSprite = new CCSpriteEx();
    if (pobSprite && pobSprite->initWithTexture(pTexture, rect))
    {
        pobSprite->autorelease();
        return pobSprite;
    }
    CC_SAFE_DELETE(pobSprite);
    return NULL;
}
Exemplo n.º 3
0
CCSpriteEx* CCSpriteEx::create(const char *pszFileName, const CCRect& rect)
{
    CCSpriteEx *pobSprite = new CCSpriteEx();
    if (pobSprite && pobSprite->initWithFile(pszFileName, rect))
    {
        pobSprite->autorelease();
        return pobSprite;
    }
    CC_SAFE_DELETE(pobSprite);
    return NULL;
}
Exemplo n.º 4
0
CCSpriteEx* CCSpriteEx::create()
{
    CCSpriteEx *pSprite = new CCSpriteEx();
    if (pSprite && pSprite->init())
    {
        pSprite->autorelease();
        return pSprite;
    }
    CC_SAFE_DELETE(pSprite);
    return NULL;
}