From 745ff2e590de69ed0b956925c83a689e34e7b366 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Wed, 6 May 2020 20:48:20 +0200 Subject: [PATCH] hand merging cause its stupid --- Game1/Game1.cs | 14 +++--- Game1/Game1.csproj | 41 ++++++++++++++++++ Game1/Sources/Objects/DayNightCycle.cs | 60 ++++++++++++++++++++++---- Game1/Sources/Objects/Tractor.cs | 5 +++ Game1/Sources/Smart/AI.cs | 5 +++ Game1/Sources/Smart/SmartTractor.cs | 5 +++ Game1/app.config | 29 ++++++++++++- 7 files changed, 144 insertions(+), 15 deletions(-) diff --git a/Game1/Game1.cs b/Game1/Game1.cs index 41454a9..e028e85 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -160,9 +160,9 @@ namespace Game1 - spriteBatch.Draw(house, houseUnit.GetRectangle(), Color.White); + spriteBatch.Draw(house, houseUnit.GetRectangle(), Time.GetTimeOfDay()); spriteBatch.Draw(markers, new Rectangle((int)tractorUnit.getPath().getFinalDest().getCords().X * (input.getSpacingTile()) + Convert.ToInt32(input.getTileSize() / 6), (int)tractorUnit.getPath().getFinalDest().getCords().Y * (input.getSpacingTile()) + Convert.ToInt32(input.getTileSize() / 6), Convert.ToInt32(input.getTileSize() / 1.5), Convert.ToInt32(input.getTileSize() / 1.5)), Color.Red); //Draws the current target of the tractor - 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()), Color.White, tractorUnit.getRotation(), new Vector2(input.getTileSize() / 2, input.getTileSize() / 2), 1.0f, SpriteEffects.None, 1); + 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); @@ -176,8 +176,9 @@ namespace Game1 } spriteBatch.DrawString(Bold, "Time: ", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkRed); - spriteBatch.DrawString(Bold, Time.getDayNight(), new Vector2(60, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkBlue); - spriteBatch.DrawString(Bold, Time.GetTimeOfDayInt().ToString(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Days " + Time.getDays(), new Vector2(60, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 2), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Day Progression: ", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkRed); + spriteBatch.DrawString(Bold, Time.GetTimeOfDayInt().ToString() + "%", new Vector2(140, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 22), Color.DarkBlue); spriteBatch.DrawString(Bold, "Tractor Properties:", new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 62), Color.DarkRed); @@ -194,6 +195,9 @@ namespace Game1 spriteBatch.DrawString(Bold, "Matrix Size: " + input.getSize().X.ToString() + " X " + input.getSize().Y.ToString(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 242), Color.DarkBlue); spriteBatch.DrawString(Bold, "House Position: " + houseUnit.getVector() / input.getSpacingTile(), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 262), Color.DarkBlue); + spriteBatch.DrawString(Bold, "Total Weight: ", new Vector2(700, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 182), Color.DarkRed); + spriteBatch.DrawString(Bold, "(" + tractorUnit.getInventory().getWeight() + "/" + tractorUnit.getInventory().getMaxWeight() + ")", new Vector2(800, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 182), Color.DarkBlue); + tractorUnit.drawInventory(input, spriteBatch, Bold, inventory.getPredefinedItems()); InspectTile(); @@ -213,7 +217,7 @@ namespace Game1 for (int j = 0; j < input.getSize().Y; j++) { Rectangle tilePos = new Rectangle(i * (input.getSpacingTile()), j * (input.getSpacingTile()), input.getTileSize(), input.getTileSize()); - spriteBatch.Draw(tile[tractorUnit.getFarm().getCrop(i, j).getStatus()], tilePos, Color.White); + spriteBatch.Draw(tile[tractorUnit.getFarm().getCrop(i, j).getStatus()], tilePos, Time.GetTimeOfDay()); if (tilePos.Intersects(mousePosition)) { spriteBatch.Draw(tile[tractorUnit.getFarm().getCrop(i, j).getStatus()], tilePos, Color.FromNonPremultiplied(0, 0, 20, 40)); diff --git a/Game1/Game1.csproj b/Game1/Game1.csproj index 264915a..ba120d6 100644 --- a/Game1/Game1.csproj +++ b/Game1/Game1.csproj @@ -15,6 +15,8 @@ Windows v4.6.1 + + x64 @@ -92,6 +94,7 @@ $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll + @@ -112,6 +115,44 @@ + + + 2.3.1 + + + 1.4.0 + + + 1.4.0 + + + 1.4.0 + + + 1.4.0 + + + 12.0.3 + + + 4.7.0 + + + 1.7.0 + + + 4.5.4 + + + 4.7.0 + + + 4.7.1 + + + 4.11.0 + +