Added option to toggle vsync
For the ultimate PC master race experience. Also calling water scroll on every frame with deltatime instead of being called at fixed intervals, making it look smoother as framerate increases.
This commit is contained in:
@@ -74,10 +74,10 @@ namespace Barotrauma
|
||||
spriteBatch.End();
|
||||
}
|
||||
|
||||
public void ScrollWater()
|
||||
public void ScrollWater(float deltaTime)
|
||||
{
|
||||
wavePos.X += 0.0001f;
|
||||
wavePos.Y += 0.0001f;
|
||||
wavePos.X += 0.006f*deltaTime;
|
||||
wavePos.Y += 0.006f*deltaTime;
|
||||
}
|
||||
|
||||
public void Render(GraphicsDevice graphicsDevice, Camera cam, RenderTarget2D texture, Matrix transform)
|
||||
|
||||
Reference in New Issue
Block a user