creator 2.0.1
b2ContactManager.prototype.Collide里面fixtureA.GetBody();有可能会出现没有body的情况,导致卡死
解决:在var bodyB = fixtureB.GetBody();下面加
if(!bodyA||!bodyB||!bodyA.body||!bodyB.body){
var cNuke = c;
c = cNuke.m_next;
this.Destroy(cNuke);
continue;
}
creator 2.0.1
b2ContactManager.prototype.Collide里面fixtureA.GetBody();有可能会出现没有body的情况,导致卡死
解决:在var bodyB = fixtureB.GetBody();下面加
if(!bodyA||!bodyB||!bodyA.body||!bodyB.body){
var cNuke = c;
c = cNuke.m_next;
this.Destroy(cNuke);
continue;
}
升级引擎后还是没加这段代码,你们都没遇到这问题吗,我每次升级引擎都要手动加进去