mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-08-11 11:12:33 +08:00
Used world state for heigh/width
This commit is contained in:
@@ -6,7 +6,7 @@ options = {
|
||||
onPlayerUpdate: function (state),
|
||||
onEntityUpdate: function (state),
|
||||
onPlayerRemove: function (id),
|
||||
onGameState: function (state),
|
||||
onWorldState: function (state),
|
||||
onPing: function (pingDelay),
|
||||
onUpdatePlayerPhysics: function (state, inputs, deltaTime),
|
||||
onInterpolation: function(previousState, targetState, amount)
|
||||
@@ -175,8 +175,8 @@ var GarageServerIO = (function (socketio) {
|
||||
}
|
||||
});
|
||||
_socket.on('state', function (data) {
|
||||
if (_options.onGameState) {
|
||||
_options.onGameState(data);
|
||||
if (_options.onWorldState) {
|
||||
_options.onWorldState(data.worldState);
|
||||
}
|
||||
_stateController.physicsDelta = data.physicsDelta;
|
||||
_stateController.interpolation = data.interpolation;
|
||||
|
||||
Reference in New Issue
Block a user