Search code examples
iphonecocos2d-xcocos2d-x-3.0

How to compare the Two CCSprite in cocos2d V3.x with IOS


I'm working with the cocos2d 3.x and Xcode 5.1.1.And i need to compare two CCSprite from one to another (like a candy crush).i move the sprite (by tochMoved function) i need to compare with the next column sprite if it matched means it to be blazed otherwise it move the old position Any one help me..


Solution

  • Easiest way to make this logic is use tag value of sprite to indicate "candy" type. Compare sprite texture is really bad idea.