mirror of https://github.com/axmolengine/axmol.git
fix object size error while data is error
This commit is contained in:
parent
d2bc03f80f
commit
aa6f2ec4b6
|
@ -235,7 +235,10 @@ namespace cocostudio
|
|||
tmx = TMXTiledMap::create(path);
|
||||
if (tmx)
|
||||
{
|
||||
//先保存资源的尺寸,等编辑器的数据设置完成后,再刷回资源尺寸,防止数据中尺寸和资源部匹配
|
||||
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