We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
读取tiled地图属性出错
读取tiled地图属性出错
Bug #3834 [Closed]
inline ValueMap getProperties() const{ return _properties; }; 这个才是引擎的源代码.我发的是我改过之后的
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8325
Status: | Closed | |
---|---|---|
Start date: | 2014-01-24 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | - | |
Target version: | - |
TMXMapInfo这个类获取属性列表的时候返回的不是引用。插入数据为空
TMXMapInfo中获取数据容器的方法 inline ValueMap& getProperties() { return _properties; };
TMXMapInfo 插入数据的时候调用了这个方法
else if ( tmxMapInfo->getParentElement() == TMXPropertyMap )
{
// The parent element is the map
Value value = attributeDict["value"];
std::string key = attributeDict["name"].asString();
tmxMapInfo->getProperties().insert(std::make_pair(key, value)); -->注意这句
}