Created
August 13, 2018 17:45
-
-
Save MikeShi42/86db6dfd24af37cb7d2ca9bcb7a9c2f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let remoteGame = null; | |
let localGame = null; | |
// Wait till the browser is ready to render the game (avoids glitches) | |
window.requestAnimationFrame(function () { | |
const socket = io.connect(window.location.origin); | |
remoteGame = new GameManager(socket, true, 4, KeyboardInputManager, HTMLActuator, LocalStorageManager); | |
localGame = new GameManager(socket, false, 4, KeyboardInputManager, HTMLActuator, LocalStorageManager); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment