源码是这样的:
var babyBodyCount = this.babyBodyCount;
ctx1.drawImage(babyBoby[babyBodyCount], -babyBoby[babyBodyCount].width * 0.5+23, -babyBoby[babyBodyCount].height * 0.5);
报错如下:
baby.js:104 Uncaught TypeError: Cannot read property 'width' of undefined
at babyObj.draw (baby.js:104)
at gameloop (main.js:111)
at game (main.js:37)
是不是main.js文件里用来存放图片的数组babyBody没有定义,或者定义错了?