We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 753fe4d commit 82e97cbCopy full SHA for 82e97cb
cocos2d/CCParallaxNode.m
@@ -95,7 +95,15 @@ -(void) addChild: (CCNode*) child z:(NSInteger)z parallaxRatio:(CGPoint)ratio po
95
96
-(void) removeChild:(CCNode*)node cleanup:(BOOL)cleanup
97
{
98
- [_parallaxArray removeObject:node];
+ for(NSUInteger i = 0; i < _parallaxArray.count; i++){
99
+ CGPointObject *point = _parallaxArray[i];
100
+
101
+ if(point.child == node) {
102
+ [_parallaxArray removeObjectAtIndex:i];
103
+ break;
104
+ }
105
106
107
[super removeChild:node cleanup:cleanup];
108
}
109
0 commit comments