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

This commit is contained in:
Jeremiah Billmann
2015-05-20 02:10:07 +00:00
parent 21d8fb2884
commit fbdcfe3da5
12 changed files with 48 additions and 25 deletions
+4 -1
View File
@@ -113,7 +113,7 @@ The current ping in milliseconds.
---
```js
options.onUpdateClientPredictionReady(callback(playerId, playerCurrentState, inputs, deltaTime))
options.onUpdateClientPredictionReady(callback(playerId, playerCurrentState, entityCurrentStates: [, {id, state}], inputs, deltaTime))
```
If using client side prediction, this callback will fire when you should update player and entity states, based on the current states for player and entities, inputs to be processed, and the delta time.
@@ -126,6 +126,9 @@ The id of the player.
`playerCurrentState` **object literal**
The current state of the player.
`entityCurrentStates` **array**
The list of all entities and their current state that were invoked by the player.
`inputs` **array**
List of all the inputs to be processed.