为啥我的没有海葵呢?

来源:2-3 海葵绘制

慕粉173932103

2018-05-10 14:51

为啥我的没有海葵呢?

for(var i=0;i<this.num;i++){

//beginPath,moveTo,lineTo,stroke,strokeStyle,

//lineWidth,lineCap,globalAlpha

ctx2.beginPath();

ctx2.moveTo(this.x[i],canHeight);

ctx2.lineTo(this.x[i],canHeight-this.len[i]);

ctx2.lineWidth=10;

//ctx2.lineCap="round";

ctx2.strokeStyle="purple";

ctx2.stroke();

}


写回答 关注

2回答

  • 慕粉4323859
    2018-12-25 18:11:16

    function gameloop(){

    // 绘制海葵

    ane.draw();

    }

    加上ane.draw();


  • qq_无期_2
    2018-08-24 10:21:38

    只是看这个代码应该没什么问题吧,是不是其他的地方出了问题


HTML5小游戏---爱心鱼(上)

学做HTML5游戏,轻轻松松带你上手,适合刚入手游戏开发的同学

92353 学习 · 550 问题

查看课程

相似问题