Cocos2d 2.0 - Ignoring touches to transparent areas of layers/sprites

前端 未结 4 2112
一生所求
一生所求 2020-12-14 09:30

I have an app where I have several layers created from PNG images with transparency. These layers are all on the screen over each other. I need to be able to ignore touches

4条回答
  •  甜味超标
    2020-12-14 10:09

    if Lio's solution doesn't work, you may add add transparent sprite as a child you yours, place it just under your non-transparent area with size of this non-tranparent area and resive all touches by this new transparent sprite, but not by original sprite.

提交回复
热议问题