Code cleanup

This commit is contained in:
Jeremiah Billmann
2013-07-09 21:40:51 -04:00
parent faf5434d23
commit 39751c8044
6 changed files with 20 additions and 26 deletions
+2 -7
View File
@@ -3,13 +3,8 @@ $(function () {
GarageServerIO.initializeGarageServer('http://garageserver_io.jbillmann.c9.io', {
logging: true,
onUpdatePlayerPhysics: getNewPlayerState,
onInterpolation: function (id, previousState, targetState, amount) {
var interpolationState = {};
interpolationState.x = (previousState.x + amount * (targetState.x - previousState.x));
interpolationState.y = (previousState.y + amount * (targetState.y - previousState.y));
return interpolationState;
}
onUpdatePlayerPhysics: GamePhysics.getNewState,
onInterpolation: GamePhysics.getInterpolatedState
});
GarageServerIO.setPlayerState({ x: 0, y: 0 });