From 0063eb17f868bb0f30683b4cbdc23fbcba740851 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 6 May 2020 17:43:36 +0200 Subject: [PATCH] Day and night cycle --- Game1/Game1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Game1/Game1.cs b/Game1/Game1.cs index d881174..e12971d 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);