-
-
Save caoakleyii/be656ed5aa6f69bb43f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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