Created
August 13, 2018 18:11
-
-
Save MikeShi42/952728aa220d2b60a0cb26269b4f67d5 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
class GameManager { | |
constructor(socket, remotePlayer, size, InputManager, Actuator, StorageManager) { | |
... | |
// Add this new if statement | |
if (this.remotePlayer) { | |
this.socket.on('move', this.handleRemoteMove.bind(this)); | |
} | |
// No setup! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment