Fix tmx object group x, y parse issue (#3108)

This commit is contained in:
pandamicro
2018-08-16 22:45:00 +08:00
committed by GitHub
parent ada1d1335c
commit 7490c5de5c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -582,7 +582,7 @@ var Sprite = cc.Class({
}
},
_onTextureLoaded: function (event) {
_onTextureLoaded: function () {
if (!this.isValid) {
return;
}
+2 -2
View File
@@ -867,8 +867,8 @@ cc.TMXMapInfo.prototype = {
objectProp["width"] = parseFloat(selObj.getAttribute('width')) || 0;
objectProp["height"] = parseFloat(selObj.getAttribute('height')) || 0;
objectProp["x"] = (selObj.getAttribute('x') || 0);
objectProp["y"] = (selObj.getAttribute('y') || 0);
objectProp["x"] = parseFloat(selObj.getAttribute('x')) || 0;
objectProp["y"] = parseFloat(selObj.getAttribute('y')) || 0;
objectProp["rotation"] = parseFloat(selObj.getAttribute('rotation')) || 0;