mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Removed hardcode GarageServer.IO server path
This commit is contained in:
@@ -181,6 +181,9 @@ var GarageServerIO = (function (socketio) {
|
||||
|
||||
initializeGarageServer = function (path, options) {
|
||||
_options = options;
|
||||
if(path == null || path.length <= 0) {
|
||||
throw new Error('GarageServer.IO client is missing the server path - please verify the path argument passed to GarageServerIO.initializeGarageServer.');
|
||||
}
|
||||
_socket = _io.connect(path + '/garageserver.io');
|
||||
registerSocketEvents();
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ $(function () {
|
||||
|
||||
window.addEventListener('resize', resizeCanvas, false);
|
||||
|
||||
GarageServerIO.initializeGarageServer('https://garageserver_io-c9-jbillmann.c9.io', {
|
||||
GarageServerIO.initializeGarageServer('', {
|
||||
logging: true,
|
||||
onReady: startGame,
|
||||
onUpdatePlayerPrediction: GamePhysics.getNewPlayerState,
|
||||
|
||||
Reference in New Issue
Block a user