ANGRY SNEK



LOG | FILES | OVERVIEW


F diff --git a/snek.js b/snek.js --- a/snek.js +++ b/snek.js
context=canvas.getContext("2d");
canvas.addEventListener('mousemove', e => { cursor.x=e.offsetX; cursor.y=e.offsetY; });
+ canvas.addEventListener('touchmove', e =>
+ {
+ cursor.x=e.changedTouches[0].clientX;
+ cursor.y=e.changedTouches[0].clientY;
+
+ });
mice=[];
mice.push(createMouse(200,100,1,normalMouseSpeed,normalMouseSize));