Ejemplo n.º 1
0
BlockSprite* BlockSprite::createWithImage(std::string path, Rect rect)
{
    BlockSprite* pBlock = new BlockSprite();
    bool rst = pBlock->initWithFile(path, rect);
    if(rst)
    {
        pBlock->autorelease();
        return pBlock;
    }
    else{
        return nullptr;
    }
}