tiledmap 多个objectgroup

This commit is contained in:
songhao 2019-05-10 14:13:20 +08:00
parent c9cfa04354
commit f66ba1b9a2

View File

@ -80,7 +80,8 @@ namespace f8
}
}
std::shared_ptr<a8::XObject> objgroup_node = xobj.At("child_node.objectgroup")->At(0);
for (int group_id = 0; group_id < xobj.At("child_node.objectgroup")->Size(); group_id++) {
std::shared_ptr<a8::XObject> objgroup_node = xobj.At("child_node.objectgroup")->At(group_id);
for (int i = 0; i < objgroup_node->At("child_node.object")->Size(); i++) {
std::shared_ptr<a8::XObject> object_node = objgroup_node->At("child_node.object")->At(i);
TiledObject object;
@ -107,6 +108,7 @@ namespace f8
}
}
}
return true;