请指教 :水藻数量异常,一开始有很多在同一地方
代码如下:(按照老师的来的)
if(this.l[i] <= 14){
var NO = this.aneNo[i];
this.x[i] = ane.headx[NO];
this.y[i] = ane.heady[NO];
this.l[i] += this.spd[i] * deltaTime;
//console.log(i+":"+this.x[i]);
//ctx2.drawImage(pic,this.x[i]-this.l[i]/2,
// this.y[i]-this.l[i]/2,this.l[i],this.l[i]);
}
else{
this.y[i] -= this.spd[i] * 7 * deltaTime;
}
ctx2.drawImage(pic,this.x[i]-this.l[i]/2,
this.y[i]-this.l[i]/2,this.l[i],this.l[i]);