data.addScore();为什么一直显示错误?
function momBabyCollision() { var l = calLength2(mom.x,mom.y,baby.x,baby.y); if( l < 900){ //baby recover baby.babyBodyCount =1; // data.reset(); mom.momBodyCount = 0; } } dataObj.prototype.addScore=function () { this.score +=this.fruitNum * 100 * this.double; this.fruitNum=0; this.double =1; }