Пример #1
0
GAFAsset* GAFAsset::create(const std::string& gafFilePath, GAFTextureLoadDelegate_t delegate, GAFLoader* customLoader /*= nullptr*/)
{
    GAFAsset * ret = new GAFAsset();
    if (ret && ret->initWithGAFFile(gafFilePath, delegate, customLoader))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_RELEASE(ret);
    return nullptr;
}
Пример #2
0
void GAFAsset::getResourceReferences(const std::string& gafFilePath, std::vector<GAFResourcesInfo*> &dest)
{
    GAFAsset * asset = new GAFAsset();
    asset->m_state = State::DryRun;
    if (asset && asset->initWithGAFFile(gafFilePath, nullptr))
    {
        asset->parseReferences(dest);
    }
    CC_SAFE_RELEASE(asset);
    return;
}