Skip to content

Commit c25cb77

Browse files
author
linshun
committed
issue cocos2d#1446: fixed parallax node bug
1 parent 1384251 commit c25cb77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cocos2d/tileMap_parallax_nodes/CCParallaxNode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ cc.PointObject.create = function (ratio, offset) {
9797
var ret = new cc.PointObject();
9898
ret.initWithCCPoint(ratio, offset);
9999
return ret;
100-
}
100+
};
101101

102102
/**
103103
* <p>cc.ParallaxNode: A node that simulates a parallax scroller<br />
@@ -172,7 +172,7 @@ cc.ParallaxNode = cc.Node.extend(/** @lends cc.ParallaxNode# */{
172172
removeChild:function (child, cleanup) {
173173
for (var i = 0; i < this._parallaxArray.length; i++) {
174174
var point = this._parallaxArray[i];
175-
if (point.getChild().isEqual(child)) {
175+
if (point.getChild() == child) {
176176
this._parallaxArray.splice(i, 1);
177177
break;
178178
}
@@ -226,4 +226,4 @@ cc.ParallaxNode = cc.Node.extend(/** @lends cc.ParallaxNode# */{
226226
cc.ParallaxNode.create = function () {
227227
var ret = new cc.ParallaxNode();
228228
return ret;
229-
}
229+
};

0 commit comments

Comments
 (0)