Reputation: 71
I am learning cocos2d and that we have multiple layers in single scene. I want to manage both layers at a time I.e, first scene with 480X320 image and second one also with same size. when I try the second one is only visible. Thats ok. But whenever touch occurs I want to add another sprite to both of the layers (different sprites for each). Could any one help with this.
Thanks
Upvotes: 2
Views: 1889
Reputation: 64478
Why are you using multiple layers? Layers are for grouping multiple objects so that you can apply effects like movement to all nodes of the layer.
It sounds to me as if you should just be adding sprites to one layer. And if you add two sprites at fullscreen size, one will be on top of the other regardless unless it has transparent parts in the image.
Upvotes: 2