i have a game on IPhone with several enemies categories ,and several enemies in each category and i want to add a collisionpairfuction to handle collisions.
Code: Select all
and then in A_B_Coll
{
fireBulletToA;
cpSpaceRemoveCollisionPairFunc(space , 200, B);
return 0;
}
[/code]
A is the enemy collision_type = 200 .... i ve got 20 enemies of A do i have to make a different collision_type for each one ?
B is a defence tower with circle Shape to detect collision
1-do i have to make a different collision_type for each one ?
2- if i added cpSpaceAddCollisionPairFunc(space , 200, B, &A_B_Coll,self); 20 times can i stop it for a specific enemy ex A11