Drawing an X shape on a HTML5 canvas and checking for collisions with a border

前端 未结 1 1292
孤街浪徒
孤街浪徒 2021-01-23 23:01

I am working on a maze game in HTML 5.

Here is the function which I use to draw an \"X\" on the canvas (using the touchpad, the user will navigate the X through the laby

1条回答
  •  礼貌的吻别
    2021-01-23 23:28

    Wow, writing the question made it clear:

    var imgd = ctx.getImageData(checkx - xdim, checky - xdim, 16, 16);
    

    Ty guys

    0 讨论(0)
提交回复
热议问题