if (y2 > this.centerY()){ var distance = Math.abs(y2 - this.centerY()); var pixel_distance = distance * $gameMap.tileHeight() ; //像素距离 var pixel_speed = Math.min(pixel_distance/speedRatio_y,$gameSystem._drill_LCa_speedMax); //像素速度 if( pixel_speed < 0.25 ){ pixel_speed = 0.25; } //像素最小速度(1/4像素) if( pixel_distance < pixel_speed ){ //第一次收敛(最小收敛间距) $gameTemp._drill_LCa_pixel_fix_y = 0; //(镜头停止移动后,所有像素必须吻合归位) $gameMap.scrollDown( distance ); // }else{ pixel_speed += $gameTemp._drill_LCa_pixel_fix_y; //速度小数位补正 $gameTemp._drill_LCa_pixel_fix_y = pixel_speed - Math.round(pixel_speed); //补正值 pixel_speed = Math.round(pixel_speed); //设置速度为固定像素速度 if( pixel_distance < pixel_speed ){ //第二次收敛(round镜头墙bug) $gameTemp._drill_LCa_pixel_fix_y = 0; // $gameMap.scrollDown( distance ); // }else{ $gameMap.scrollDown( pixel_speed/$gameMap.tileHeight() ); } } }