Exemple #1
0
 void Update()
 {
     if (this.platformerConfig != null)
     {
         PlatformerCharacterInput.Update(platformerInputState, platformerState);
         PlatformerCharacter.Update(transform, platformerState, platformerConfig);
     }
 }
 void Update()
 {
     if (networkSend != null)
     {
         PlatformerCharacterInput.Update(platformerInputState, platformerState);
         PlatformerCharacter.Update(transform, platformerState, platformerConfig);
     }
 }
Exemple #3
0
 void Update()
 {
     if (this.platformerConfig != null)
     {
         PlatformerCharacterInput.Update(platformerInputState, platformerState);
         PlatformerCharacter.Update(transform, platformerState, platformerConfig);
         if (serverPosition.x > invalid.x)
         {
             transform.position = Vector3.Lerp(transform.position, serverPosition, Time.deltaTime * interpolation);
         }
     }
 }
Exemple #4
0
 void Update()
 {
     if (networkSend != null)
     {
         PlayerInputClient.Update(inputConfig, playerInputState);
         PlatformerCharacterInput.Update(platformerInputState, platformerState);
         PlatformerCharacter.Update(transform, platformerState, platformerConfig);
         if (!playerInputState.platformerState.Equals(playerInputState.oldState))
         {
             inputMessage.position.FromVector(transform.position);
             networkSend(OpCode.PLAYER_INPUT, inputMessage);
             playerInputState.platformerState.CopyTo(playerInputState.oldState);
         }
     }
 }