From 7f4a55a3725757f4be86fea6b6368f1f6e6ff525 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 14 Mar 2021 17:37:59 +0100 Subject: [PATCH] fixed clouds not spawning smoothly --- GreatSpringGameJam/Map.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GreatSpringGameJam/Map.cs b/GreatSpringGameJam/Map.cs index ddf99f4..d1a9e2c 100644 --- a/GreatSpringGameJam/Map.cs +++ b/GreatSpringGameJam/Map.cs @@ -117,7 +117,7 @@ namespace GreatSpringGameJam { for (var x = 0; x < parW; x += mountains.Width * 2) batch.Draw(mountains, parallax + new Vector2(x, parH - mountains.Height * 2), Color.White * 0.5F, 0, Vector2.Zero, 2, SpriteEffects.None, 0); var clouds = BackgroundTexture[0, 4, 8, 2]; - for (var x = -1; x < parW / clouds.Width / 2; x++) { + for (var x = -2; x < parW / clouds.Width / 2; x++) { var pos = new Vector2(x * clouds.Width * 2, parH - mountains.Height * 2 - clouds.Height * 4); batch.Draw(clouds, parallax + pos + new Vector2((float) time.TotalGameTime.TotalSeconds * 3 % (clouds.Width * 2), 0), Color.White * 0.5F, 0, Vector2.Zero, 2, SpriteEffects.None, 0); batch.Draw(clouds, parallax + pos + new Vector2(clouds.Width + (float) time.TotalGameTime.TotalSeconds * 2.5F % (clouds.Width * 2), clouds.Height * 1.5F), Color.White * 0.5F, 0, Vector2.Zero, 2, SpriteEffects.None, 0);