Projects > cpp > Issues > Bug #3834

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

读取tiled地图属性出错

Bug #3834 [Closed]
zwpxiaob@qq.com 2014-01-24 06:29 . Updated almost 9 years ago

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)); -->注意这句
}

zwpxiaob@qq.com 2014-01-24 06:31

inline ValueMap getProperties() const{ return _properties; }; 这个才是引擎的源代码.我发的是我改过之后的

walzer@cocos2d-x.org 2014-10-08 02:47

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

Atom PDF

Status:Closed
Start date:2014-01-24
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:-
Target version:-