Sami
Sami

Reputation: 139

How to put element on top of other which is in higher layer in Cocos2D?

I have a gameplay scene with it's own layer and other layer which handles all the HUD information (hp bars, turn counts and so forth). I have put the HUD layer on top of the gameplay layer. The problem is, I have some elements in gameplay scene that I would like to be on top of the HUD elements. I can't seem to be able to do that by just specificating higher z value on a sprite for example.

Is there a solution for this and what would it be?

Upvotes: 0

Views: 136

Answers (1)

jrtc27
jrtc27

Reputation: 8536

Yes - add these elements either to the HUD layer or to a third layer above both.

Upvotes: 1

Related Questions