最新回答 / 慕仔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
最新回答 / 薄荷味的白襯衫
beginPath();ctx2.moveTo(this.rootx[i],canHeight);this.headx[i] = this.rootx[i] + l * this.amp[i];ctx2.quadraticCurveTo(this.rootx[i],canHeight - 120,this.headx[i],this.heady[i]);
2016-06-28
最新回答 / 楊凱迪
?if (this.r[i] > 60) {? ? ? ? ? ? ? ? this.alive[i] = false;? ? ? ? ? ? ? ? continue;? ? ? ? ? ? }?continue;改成break;
2016-06-26
已采納回答 / 尐調_
第一步,在main.js中加載資源,以眼睛為例子var babyEye=[];init(){for(var i=0;i<2;i++){ ? ?babyEye[i]= new Image(); ? ?babyEye[i].src = "images/babyEye"+i+".png";}}第二步,刪除baby.js中的眼睛定義this.babyEye = new Image();this.babyEye.src = "./src/babyEye0.png";看你的代碼,應該是因為沒有去除babyObj...
2016-06-22