@rohit wrote:
I want to change the parent of a sprite on onTouchMoved. But when i does it i cant move it now.To get the onTouchMoved event i have to touch it(OnTouchBegan).How can i do that.
On On touchMovedEvent of sprite i have changed the parent as
this->retain();
this->removeFromParentAndCleanup(false);//Previously it is not the child of gameLayer.
gameLayer->addChild(this,kTemporaryItemTag);
this->release();
Posts: 1
Participants: 1