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:
juanjp600
2016-09-18 18:17:15 -03:00
parent 5da2bc9523
commit c97f729fb3
8 changed files with 35 additions and 16 deletions

View File

@@ -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)