xzfc / agar-expose

Yet another ogar client
12 stars 12 forks source link

Move player? #33

Open MrSonicMaster opened 8 years ago

MrSonicMaster commented 8 years ago

How would I be able to move the player to a specific X and Y using canvas events? example: function moveTo(x,y){ document.getElementById('canvas').onmousemove({clientX:x, clientY:y}); }

mbm3 commented 8 years ago

This would be very helpful. If anyone knows how to move player, please help us out.

Tombez commented 8 years ago
function moveMouse(x, y) {
    $("canvas").trigger($.Event("mousemove", {clientX: x, clientY: y}));
}
mbm3 commented 8 years ago

@Tombez thanks, will test out later.