I'm creating a game with cocos2d-x HTML5 There are two images on one layer that are almost identical but many different - There are different areas and when I click on one of them, if two images have a different pixel in the clicked area, then I want to add a sticker to one place in both pictures.
I want to ask how can I compare image pixels on Cocos 2D-H HTML5? And how do I create a click event to place a sticker?
Perhaps the CCImage class will help you.
I suggest, as you already have 2 images, and you know a different area, you can create a plast dictionary to record the position and size of the area.
In your game scene, you can add a transparent touchable sprite created from your config list file, and you can set a color when touching it.
Comments
Post a Comment