sprite=Sprite::create("bg.png");sprite->setPosition(960,640);this->addChild(sprite,0);
sprite1=Sprite::create("face.png");sprite1->setPosition(960+x,640);sprite->addChild(sprite1,1);
sprite2=Sprite::create("eyeLeft.png");sprite2->setPosition(960+x,640+y);sprite1->addChild(sprite2,2);
sprite3=Sprite::create("eyeRight.png"); sprite3->setPosition(960,640+y); sprite1->addChild(sprite3,2);
here i want to create sprite1 as MenuItem and add as child into the same layer i.e. sprite1 but i am getting child already added , how can i achieve this?
Aucun commentaire:
Enregistrer un commentaire