Skip to content

Instantly share code, notes, and snippets.

@damienalexandre
Created March 23, 2012 00:16
Show Gist options
  • Save damienalexandre/2165729 to your computer and use it in GitHub Desktop.
Save damienalexandre/2165729 to your computer and use it in GitHub Desktop.
socket.on('batchmove', function(data) {
for (var i = 0; i < data.length; i++) {
socket.emit('move', {x: data[i].x, y: data[i].y, id: myId});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment