From 46d27ab057bef81fb207abbca75f286056169219 Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 24 May 2020 13:36:31 +0200 Subject: [PATCH] asd --- Game1/Game1.cs | 10 ---------- Game1/Sources/Crops/Farm.cs | 10 +++++----- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Game1/Game1.cs b/Game1/Game1.cs index f2d6d6b..5ac7da2 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -311,16 +311,6 @@ namespace Game1 } } - /*cloudFrame++; - if (cloudFrame > cloudAnimationSpeed) - { - cloudSprite++; - if (cloudSprite > 4) - { - cloudSprite = 0; - } - cloudFrame = 0; - }*/ spriteBatch.Draw(house, houseUnit.GetRectangle(), Time.GetTimeOfDay()); spriteBatch.Draw(tractor, new Vector2((int)tractorUnit.getPos().X + input.getTileSize() / 2, (int)tractorUnit.getPos().Y + input.getTileSize() / 2), new Rectangle(0, 0, input.getTileSize(), input.getTileSize()), Time.GetTimeOfDay(), tractorUnit.getRotation(), new Vector2(input.getTileSize() / 2, input.getTileSize() / 2), 1.0f, SpriteEffects.None, 1); diff --git a/Game1/Sources/Crops/Farm.cs b/Game1/Sources/Crops/Farm.cs index 8ddd606..1acd5ce 100644 --- a/Game1/Sources/Crops/Farm.cs +++ b/Game1/Sources/Crops/Farm.cs @@ -64,7 +64,6 @@ class Farm { if (!astar.isReachable(crops, new Vector2((int)i, (int)j), housepos)) { - //crops[i, j].setStatus(1); dirtCount--; } } @@ -85,12 +84,13 @@ class Farm public Rectangle getDestinationRectangle(int x, int y) { return new Rectangle(x + (int)Math.Round(RainPosition.X), y + (int)Math.Round(RainPosition.Y), 1, 1); - //return new Rectangle(0, 0, 112, 112); } public void drawWeatherInformation(SpriteBatch spriteBatch, SpriteFont Bold, Input input) { - spriteBatch.DrawString(Bold, "Wind Speed: X:" + WindSpeed.X + "Y" + WindSpeed.Y, new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue); + spriteBatch.DrawString(Bold, "WindSpeed: " + Math.Round(WindSpeed.X, 4), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue); + spriteBatch.DrawString(Bold, " : ", new Vector2(153, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue); + spriteBatch.DrawString(Bold, Math.Round(WindSpeed.Y, 4).ToString(), new Vector2(163, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue); } public void updateFarm(Vector2 Size, int nDay) @@ -147,8 +147,8 @@ class Farm private void updateRainMapPosition() { float x, y; - x = WindSpeed.X + GetRandomNumber(-1f, 1f) / 1000; - y = WindSpeed.Y + GetRandomNumber(-1f, 1f) / 1000; + x = WindSpeed.X + GetRandomNumber(-1f, 1f) / 2000; + y = WindSpeed.Y + GetRandomNumber(-1f, 1f) / 2000; if (x < 0.02f && x > -0.02f) {