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();
//一般方塊碰撞
if (spriteA.tag == 1&&spriteB.tag == 5)
box2d 碰撞后的事件只能在ContactListener里定义吗?
就是if (spriteA.tag == 1&&spriteB.tag == 5)的事件指派是否能在gamelayer中指派 ??