完全照老师的代码写的,怎么还报错呢?Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state."
报错的代码行“ctx1.drawImage(babyTail[babyTailCount], -babyTail[babyTailCount].width * 0.5 + 23, -babyTail[babyTailCount].height * 0.5);”没错吧
报错的代码行“ctx1.drawImage(babyTail[babyTailCount], -babyTail[babyTailCount].width * 0.5 + 23, -babyTail[babyTailCount].height * 0.5);”没错吧
最新回答 / 慕仔8415870
halo.JShaloObj.prototype.born=function(x,y){ for(var i=0;i<this.num;i++) { if(!this.alive[i]) { this.x[i]=x; this.y[i]=y; this.r[i]=10; this.alive[i]=true; } }}代码遗落了一个 “ !”字符if(!this.alive[i]) 加上就好了“ !”字符
2016-07-02