mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-17 11:23:30 +08:00
Cleanup and minor namespace change
This commit is contained in:
@@ -17,7 +17,7 @@ options = {
|
||||
}
|
||||
*/
|
||||
|
||||
function GarageServer (socketio, options) {
|
||||
function GarageServer(socketio, options) {
|
||||
this.io = socketio;
|
||||
this.game = new garageServerGame(options);
|
||||
this.registerSocketEvents(options);
|
||||
@@ -30,7 +30,7 @@ GarageServer.prototype.registerSocketEvents = function (options) {
|
||||
if (options.logging) {
|
||||
console.log('garageserver.io:: socket ' + socket.id + ' connection');
|
||||
}
|
||||
socket.emit('state', {
|
||||
socket.emit('state', {
|
||||
physicsDelta: (options.physicsInterval ? options.physicsInterval : 15) / 1000,
|
||||
smoothingFactor: options.smoothingFactor ? options.smoothingFactor : 1,
|
||||
interpolation: options.interpolation ? options.interpolation : false,
|
||||
|
||||
@@ -7,7 +7,7 @@ function GarageServerGame(options) {
|
||||
this.playerController = new playerController();
|
||||
this.entityController = new entityController();
|
||||
this.options = options;
|
||||
this.startTime;
|
||||
this.startTime = 0;
|
||||
this.stateInterval = options.stateInterval ? options.stateInterval : 45;
|
||||
this.stateIntervalId = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user