大鱼在 canvas1 上没有显示
场景设置:
#canvas1{
position:absolute;
bottom:0;
left:0;
z-index:1;
}
#canvas2{
position:absolute;
bottom:0;
left:0;
z-index:0;
}
画布获取:
can1=document.getElementById("canvas1");
ctx1=can1.getContext('2d');/* 绘制 2d 场景 */
大鱼设置:
this.x =canWidth * 0.5;
this.y =canHeight * 0.5;
ctx1.drawImage(this.bigEye, -this.bigEye * 0.5, -this.bigEye * 0.5);
ctx1.drawImage(this.bigBody, -this.bigBody * 0.5, -this.bigBody * 0.5);
ctx1.drawImage(this.bigTail, -this.bigTail * 0.5 + 30, -this.bigTail * 0.5);