void MyContactListener:: BeginContact (b2Contact * contact) {
/ / We need to copy out the data because the b2Contact passed in
/ / Is reused.
CCSprite * spriteA = (CCSprite *) contact-> GetFixtureA () -> GetBody () -> GetUserData ();
CCSprite * spriteB = (CCSprite *) contact-> GetFixtureB () -> GetBody () -> GetUserData ();
/ / General box collision
if (spriteA.tag == 1 & & spriteB.tag == 5)
box2d after the collision event can only be defined in ContactListener it?
That is, if (spriteA.tag == 1 & & spriteB.tag == 5) if the event assigned in "gamelayer" assigned? ?