本文整理汇总了C++中TextureFrame::setTextureName方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureFrame::setTextureName方法的具体用法?C++ TextureFrame::setTextureName怎么用?C++ TextureFrame::setTextureName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureFrame
的用法示例。
在下文中一共展示了TextureFrame::setTextureName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clone
Frame* TextureFrame::clone()
{
TextureFrame* frame = TextureFrame::create();
frame->setTextureName(_textureName);
frame->cloneProperty(this);
return frame;
}
示例2: loadTextureFrameWithFlatBuffers
Frame* ActionTimelineCache::loadTextureFrameWithFlatBuffers(const flatbuffers::TimeLineTextureFrame *flatbuffers)
{
std::string path = "";
int resourceType = 0;
std::string plist = "";
TextureFrame* frame = TextureFrame::create();
auto fileNameData = flatbuffers->fileNameData();
resourceType = fileNameData->resourceType();
switch (resourceType)
{
case 0:
{
path = fileNameData->path()->c_str();
if (FileUtils::getInstance()->isFileExist(path))
{
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
path = fullPath;
}
else
{
path = "";
}
break;
}
case 1:
{
plist = fileNameData->plistFile()->c_str();
if (FileUtils::getInstance()->isFileExist(plist))
{
path = fileNameData->path()->c_str();
}
else
{
path = "";
}
break;
}
default:
break;
}
frame->setTextureName(path);
int frameIndex = flatbuffers->frameIndex();
frame->setFrameIndex(frameIndex);
bool tween = flatbuffers->tween();
frame->setTween(tween);
return frame;
}
示例3: loadTextureFrame
Frame* ActionTimelineCache::loadTextureFrame(const rapidjson::Value& json)
{
TextureFrame* frame = TextureFrame::create();
const char* texture = DICTOOL->getStringValue_json(json, Value);
if(texture != NULL)
frame->setTextureName(texture);
return frame;
}
示例4: loadTextureFrame
Frame* ActionTimelineCache::loadTextureFrame(const rapidjson::Value& json)
{
TextureFrame* frame = TextureFrame::create();
const char* texture = DICTOOL->getStringValue_json(json, Value);
if(texture != nullptr)
{
std::string path = texture;
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path);
if(spriteFrame == nullptr)
{
std::string jsonPath = CSLoader::getInstance()->getJsonPath();
path = jsonPath + texture;
}
frame->setTextureName(path);
}
return frame;
}