Skip to content

Instantly share code, notes, and snippets.

@MikeShi42
Created August 13, 2018 17:47
Show Gist options
  • Save MikeShi42/cc117b6998f92ed627fa5b10c8e2fb6d to your computer and use it in GitHub Desktop.
Save MikeShi42/cc117b6998f92ed627fa5b10c8e2fb6d to your computer and use it in GitHub Desktop.
setup() {
if (!this.remotePlayer) {
this.inputManager.on("move", this.move.bind(this));
this.inputManager.on("restart", this.restart.bind(this));
this.inputManager.on("keepPlaying", this.keepPlaying.bind(this));
}
var previousState = this.storageManager.getGameState();
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment