Cocos2d adding a background image to a layer?

前端 未结 4 1011
忘了有多久
忘了有多久 2020-12-29 22:26

I just finished reading some of the cocos2d documentation, and as far as I understand to add a background image to a layer you have to do something like:

Spr         


        
4条回答
  •  遥遥无期
    2020-12-29 22:37

    Also layers control drawing order (over and above any inter-layer z ordering).

    In geoSpark, for example, I have a background layer, a spark layer, a UI layer, etc. (Simplified). But this allows me to make sure my UI stuff is always above any game stuff (the spark layer) and all that is above the background.

    If your game does only additive rendering, draw order won't matter much. :)

    -- David

提交回复
热议问题