void UpdatePredictedState()
 {
     predictedState = character.state;
     foreach (Vector2 input in pendingMoves)
     {
         predictedState = CharacterState.Move(predictedState, input, character.Speed, 0);
     }
     character.SyncState(predictedState);
 }
 public void AddInput(CharacterInput input)
 {
     pendingInputs.AddLast(input);
     ApplyInput(input);
     character.SyncState(predictedState);
 }
Esempio n. 3
0
 void SetObservedState(CharacterState newState)
 {
     character.SyncState(newState);
 }
 void SetObservedState(CharacterState newState)
 {
     interpolated = newState;
     character.SyncState(newState);
 }