예제 #1
0
CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file)
{
    CCScale9Sprite* pReturn = new CCScale9Sprite();
    if ( pReturn && pReturn->initWithFile(capInsets, file) )
    {
        CC_SAFE_AUTORELEASE(pReturn);
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);
    return NULL;
}
예제 #2
0
CCScale9Sprite* CCScale9Sprite::create(const char* file)
{
    CCScale9Sprite* pReturn = new CCScale9Sprite();
    if ( pReturn && pReturn->initWithFile(file) )
    {
        pReturn->autorelease();
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);
    return NULL;
}
예제 #3
0
CCScale9Sprite* CCScale9Sprite::create(const char* file, CCRect rect)
{
    CCScale9Sprite* pReturn = new CCScale9Sprite();
    if ( pReturn && pReturn->initWithFile(file, rect) )
    {
        CC_SAFE_AUTORELEASE(pReturn);
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);
    return NULL;
}