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; }
参数写错了