In my game there are a lot of kinds of physics objects.Now I add tag for every object class.So in onContactBegin,I need write a very long list to judge what kind of object is contact.getShapeA and contact.getShapeB.
Is there a easy way to do this?
For example in cocos2d-ipone
-(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair ClassA:(CCNode *)nodeA ClassB:(CCNode *)nodeB
So it’s already know nodeA is ClassA and nodeB is ClassB