Skip to content

Instantly share code, notes, and snippets.

@caoakleyii
Created February 7, 2016 01:24
Show Gist options
  • Save caoakleyii/be656ed5aa6f69bb43f7 to your computer and use it in GitHub Desktop.
Save caoakleyii/be656ed5aa6f69bb43f7 to your computer and use it in GitHub Desktop.
else if(action === Types.Messages.MOVE) {
if(self.move_callback) {
var x = message[1],
y = message[2];
if(self.server.isValidPosition(x, y)) {
self.setPosition(x, y);
self.clearTarget();
self.broadcast(new Messages.Move(self));
self.move_callback(self.x, self.y);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment