问答详情
源自:2-5 身体升级

鱼的身体怎么出不来了


 var momBodyCount = this.momBodyCount;
 if(data.double == 1){
  ctx1.drawImage(momBodyOra[momBodyCount], -momBodyOra[momBodyCount] * 0.5, -momBodyOra[momBodyCount] * 0.5);
 }
 else{
  ctx1.drawImage(momBodyBlue[momBodyCount], -momBodyBlue[momBodyCount] * 0.5, -momBodyBlue[momBodyCount] * 0.5);
 }

momBodyCount 这些数字都是对的 鱼身子的图片出不来


提问者:慕粉1415515060 2016-12-08 12:47

个回答

  • 慕粉4171108
    2016-12-15 14:41:50

    你把宽度高度漏掉了

    ctx1.drawImage(momBodyOrange[momBodyCount], -momBodyOrange[momBodyCount].width * 0.5, -momBodyOrange[momBodyCount].height * 0.5);