mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13479 from liamcindy/V3.8_reader
fix object size error while data is error
This commit is contained in:
commit
81ca089d27
|
@ -235,7 +235,10 @@ namespace cocostudio
|
|||
tmx = TMXTiledMap::create(path);
|
||||
if (tmx)
|
||||
{
|
||||
//prevent that editor's data does not match in size and resources
|
||||
Size fileSize = tmx->getContentSize();
|
||||
setPropsWithFlatBuffers(tmx, (Table*)gameMapOptions);
|
||||
tmx->setContentSize(fileSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -167,6 +167,8 @@ namespace cocostudio
|
|||
Sprite *sprite = static_cast<Sprite*>(node);
|
||||
auto options = (SpriteOptions*)spriteOptions;
|
||||
|
||||
auto nodeReader = NodeReader::getInstance();
|
||||
nodeReader->setPropsWithFlatBuffers(node, (Table*)(options->nodeOptions()));
|
||||
|
||||
auto fileNameData = options->fileNameData();
|
||||
|
||||
|
@ -242,11 +244,6 @@ namespace cocostudio
|
|||
sprite->setBlendFunc(blendFunc);
|
||||
}
|
||||
|
||||
|
||||
auto nodeReader = NodeReader::getInstance();
|
||||
nodeReader->setPropsWithFlatBuffers(node, (Table*)(options->nodeOptions()));
|
||||
|
||||
|
||||
auto nodeOptions = options->nodeOptions();
|
||||
|
||||
GLubyte alpha = (GLubyte)nodeOptions->color()->a();
|
||||
|
|
Loading…
Reference in New Issue