Creating new GarageServer.IO client API calls to support client side prediction for entities - #20

This commit is contained in:
Jeremiah Billmann
2015-05-20 01:20:14 +00:00
parent e96adda2c2
commit 21d8fb2884
3 changed files with 63 additions and 2 deletions
+14
View File
@@ -21,6 +21,9 @@ api methods
getPlayerStates : [, playerState]
getEntityStates : [, entityState]
updatePlayerState(id, state)
addEntity(id, state)
updateEntityState(id, state)
removeEntity(id)
getId() : playerid
sendServerEvent(data)
*/
@@ -354,6 +357,14 @@ var GarageServerIO = (function (socketio) {
_playerController.remove(id);
},
addEntity = function (id, state) {
},
updateEntityState = function (id, state) {
},
removeEntity = function (id) {
_entityController.remove(id);
},
@@ -439,6 +450,9 @@ var GarageServerIO = (function (socketio) {
getPlayerStates: getPlayerStates,
getEntityStates: getEntityStates,
updatePlayerState: updatePlayerState,
addEntity: addEntity,
updateEntityState: updateEntityState,
removeEntity: removeEntity,
getId: getId,
sendServerEvent: sendServerEvent
};