Quote:
Originally Posted by seenu87
am adding emitter(child) in my update method.(after collision detection) after removing the emitter when touches moved method.
its working fine.
my problem is after removing the child (when touches moved) then added because of in the update method for adding child(emitter)
code:-
Code:
- (void)update:(ccTime)dt {
emitter1.position = ccp(v1,v);
[self addChild:emitter1];
}
Code:
- (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event {
[self removeChild:emitter1 cleanup:YES];
}
how to rectify this.
|
You need to give more context.
I guess, from the fact that I've seen "ccTouchesMoved" methods in other posts on Cocos2d that this is cocos2D code? If so, please mention that in the header. I've never used Cocos2D, and have no idea how to help. People who know about it would see the subject and offer their help.