为什么我只能画出一条海葵啊?
aneObj.prototype.draw = function()
{
ctx2.save();
ctx2.globalAlpha = 0.6;
ctx2.strokeStyle = "#3b154e";
ctx2.lineWidth = 20;
ctx2.lineCap = "round";
ctx2.stroke();
for(var i =0 ;i<this.num;i++)
{
ctx2.beginPath();
ctx2.moveTo(this.x[i],canHeight);
ctx2.lineTo(this.x[i],canHeight - this.len[i]);
}
ctx2.restore();
}
为什么我只能画出一条海葵啊?