Beispiel #1
0
 protected void RpcUpdatePosition(Vector2 newPosition, bool snapToNewPos)
 {
     physicsEntity.SetTransformPosition(newPosition);
     if (spriteTransform != null)
     {
         spriteTransform.DontFlipThisFrame();
     }
     // Reset smoothing variables
     currentLerpFactor = snapToNewPos ? 1 : MIN_LAG_LERP_FACTOR;
     timeSinceLastOwnerClientUpdate = 0;
 }