cocos2d android - How to Detect the CCSprite Touchevent getBoundingbox equals of CCTouches -


i new cocos2d. using ccsprite animation button. struggle detect cctouches , ccsprite getbounding box equals click event.

from way can achieve need , write code in cctouches___() :

 arraylist<ccsprite> animation= new arraylist<ccsprite>();  cgpoint  location = ccdirector.shareddirector().converttogl(cgpoint.ccp(event.getx(), event.gety()));   (ccsprite target : animation){      if(cgrect.containspoint((target.getboundingbox()), location)){      //here want      } 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -