diff --git a/Game1/Content/BarleyIcon.png b/Game1/Content/BarleyIcon.png new file mode 100644 index 0000000..1c7b5af Binary files /dev/null and b/Game1/Content/BarleyIcon.png differ diff --git a/Game1/Content/Content.mgcb b/Game1/Content/Content.mgcb index 73c3ac3..2a9708d 100644 --- a/Game1/Content/Content.mgcb +++ b/Game1/Content/Content.mgcb @@ -13,6 +13,18 @@ #---------------------------------- Content ---------------------------------# +#begin BarleyIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:BarleyIcon.png + #begin BerriesIcon.png /importer:TextureImporter /processor:TextureProcessor @@ -37,6 +49,18 @@ /processorParam:TextureFormat=Color /build:CarronIcon.png;CarrotIcon.png +#begin CottonIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:CottonIcon.png + #begin Crop.png /importer:TextureImporter /processor:TextureProcessor @@ -56,6 +80,18 @@ /processorParam:TextureFormat=Compressed /build:Font.spritefont +#begin GroundNutsIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:GroundNutsIcon.png + #begin house.png /importer:TextureImporter /processor:TextureProcessor @@ -68,6 +104,18 @@ /processorParam:TextureFormat=Color /build:house.png +#begin MaizeIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:MaizeIcon.png + #begin Markers.png /importer:TextureImporter /processor:TextureProcessor @@ -80,6 +128,18 @@ /processorParam:TextureFormat=Color /build:Markers.png +#begin MilletsIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:MilletsIcon.png + #begin Mountain.png /importer:TextureImporter /processor:TextureProcessor @@ -104,6 +164,18 @@ /processorParam:TextureFormat=Color /build:MouseCursor.png +#begin PaddyIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:PaddyIcon.png + #begin Plantable.png /importer:TextureImporter /processor:TextureProcessor @@ -152,6 +224,42 @@ /processorParam:TextureFormat=Color /build:ProgressionBarStatus.png +#begin PulsesIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:PulsesIcon.png + +#begin SeedOilIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:SeedOilIcon.png + +#begin SugarcaneIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:SugarcaneIcon.png + #begin Tile.png /importer:TextureImporter /processor:TextureProcessor @@ -176,6 +284,18 @@ /processorParam:TextureFormat=Color /build:tileunplantable.png +#begin TobaccoIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:TobaccoIcon.png + #begin Tractor.png /importer:TextureImporter /processor:TextureProcessor diff --git a/Game1/Content/CottonIcon.png b/Game1/Content/CottonIcon.png new file mode 100644 index 0000000..eab2fb3 Binary files /dev/null and b/Game1/Content/CottonIcon.png differ diff --git a/Game1/Content/GroundNutsIcon.png b/Game1/Content/GroundNutsIcon.png new file mode 100644 index 0000000..de2cf45 Binary files /dev/null and b/Game1/Content/GroundNutsIcon.png differ diff --git a/Game1/Content/MaizeIcon.png b/Game1/Content/MaizeIcon.png new file mode 100644 index 0000000..65d19b7 Binary files /dev/null and b/Game1/Content/MaizeIcon.png differ diff --git a/Game1/Content/MilletsIcon.png b/Game1/Content/MilletsIcon.png new file mode 100644 index 0000000..30c4dcf Binary files /dev/null and b/Game1/Content/MilletsIcon.png differ diff --git a/Game1/Content/PaddyIcon.png b/Game1/Content/PaddyIcon.png new file mode 100644 index 0000000..cac6ba5 Binary files /dev/null and b/Game1/Content/PaddyIcon.png differ diff --git a/Game1/Content/PulsesIcon.png b/Game1/Content/PulsesIcon.png new file mode 100644 index 0000000..a6c9712 Binary files /dev/null and b/Game1/Content/PulsesIcon.png differ diff --git a/Game1/Content/SeedOilIcon.png b/Game1/Content/SeedOilIcon.png new file mode 100644 index 0000000..0ae6fb4 Binary files /dev/null and b/Game1/Content/SeedOilIcon.png differ diff --git a/Game1/Content/SugarcaneIcon.png b/Game1/Content/SugarcaneIcon.png new file mode 100644 index 0000000..e2f173b Binary files /dev/null and b/Game1/Content/SugarcaneIcon.png differ diff --git a/Game1/Content/TobaccoIcon.png b/Game1/Content/TobaccoIcon.png new file mode 100644 index 0000000..9a2b8df Binary files /dev/null and b/Game1/Content/TobaccoIcon.png differ diff --git a/Game1/Game1.cs b/Game1/Game1.cs index e028e85..b6ccf57 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -14,7 +14,7 @@ namespace Game1 SpriteBatch spriteBatch; SpriteFont Bold; private Texture2D[] tile = new Texture2D[5]; - private Texture2D[] Crops = new Texture2D[5]; + private Texture2D[] Crops = new Texture2D[12]; private Texture2D tractor; private Texture2D house; private Texture2D markers; @@ -50,17 +50,18 @@ namespace Game1 // TODO: Add your initialization logic here base.Initialize(); - cropTypesNames[0] = "Barley"; - cropTypesNames[1] = "Cotton"; - cropTypesNames[2] = "Ground Nuts"; - cropTypesNames[3] = "Maize"; - cropTypesNames[4] = "Millets"; - cropTypesNames[5] = "Oil Seeds"; - cropTypesNames[6] = "Paddy"; - cropTypesNames[7] = "Pulses"; - cropTypesNames[8] = "Sugarcane"; - cropTypesNames[9] = "Tobacco"; - cropTypesNames[10] = "Wheat"; + cropTypesNames[0] = "None"; + cropTypesNames[1] = "Barley"; + cropTypesNames[2] = "Cotton"; + cropTypesNames[3] = "Ground Nuts"; + cropTypesNames[4] = "Maize"; + cropTypesNames[5] = "Millets"; + cropTypesNames[6] = "Oil Seeds"; + cropTypesNames[7] = "Paddy"; + cropTypesNames[8] = "Pulses"; + cropTypesNames[9] = "Sugarcane"; + cropTypesNames[10] = "Tobacco"; + cropTypesNames[11] = "Wheat"; @@ -95,13 +96,25 @@ namespace Game1 tile[0] = Content.Load("Mountain"); tile[1] = Content.Load("tileunplantable"); tile[2] = Content.Load("Plantable"); - tile[3] = Content.Load("Planted"); - tile[4] = Content.Load("Crop"); + tile[3] = Content.Load("Crop"); + + + + + + Crops[0] = Content.Load("Markers"); + Crops[1] = Content.Load("BarleyIcon"); + Crops[2] = Content.Load("CottonIcon"); + Crops[3] = Content.Load("GroundNutsIcon"); + Crops[4] = Content.Load("MaizeIcon"); + Crops[5] = Content.Load("MilletsIcon"); + Crops[6] = Content.Load("SeedOilIcon"); + Crops[7] = Content.Load("PaddyIcon"); + Crops[8] = Content.Load("PulsesIcon"); + Crops[9] = Content.Load("SugarcaneIcon"); + Crops[10] = Content.Load("TobaccoIcon"); + Crops[11] = Content.Load("WheatIcon"); - Crops[0] = Content.Load("CarrotIcon"); - Crops[1] = Content.Load("WheatIcon"); - Crops[2] = Content.Load("BerriesIcon"); //Replace 2 and 3 with the new crop Textures - Crops[3] = Content.Load("TreePlantationIcon"); ProgressionBar = Content.Load("ProgressionBar"); ProgressionBarStatus = Content.Load("ProgressionBarStatus"); @@ -168,7 +181,7 @@ namespace Game1 for (int i = 0; i < 5; i++) { - spriteBatch.Draw(ProgressionBar, new Rectangle(i * 227, (int)(input.getSize().Y * (input.getTileSize() + input.getSpacing())), 5, 300), Color.White); + spriteBatch.Draw(ProgressionBar, new Rectangle(i * 227, (int)(input.getSize().Y * (input.getTileSize() + input.getSpacing())), 5, 295), Color.White); } for (int i = 0; i < 15; i++) { @@ -217,6 +230,9 @@ 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, Time.GetTimeOfDay()); if (tilePos.Intersects(mousePosition)) { @@ -232,15 +248,22 @@ namespace Game1 x = i; y = j; } + if (tractorUnit.getFarm().getCrop(i, j).getStatus() != 0 && tractorUnit.getFarm().getCrop(i, j).getStatus() != 1) + { + spriteBatch.Draw(Crops[tractorUnit.getFarm().getCrop(i, j).getCropType()], new Rectangle(i * input.getSpacingTile(), j * input.getSpacingTile(), input.getTileSize(), input.getTileSize()), Color.White); + } } - if ((tractorUnit.getFarm().getCrop(i, j).getStatus() == 4)) + else { - spriteBatch.Draw(ProgressionBar, new Rectangle(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 3, j * (input.getSpacingTile()), input.getTileSize() / 3, input.getTileSize()), Color.White); - spriteBatch.Draw(ProgressionBarStatus, new Rectangle(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 4, j * (input.getSpacingTile()) + input.getTileSize() / 3, input.getTileSize() / 4, tractorUnit.getFarm().getCrop(i, j).getCropTimerBar((input.getTileSize())) + 1), Color.White); - } - if (tractorUnit.getFarm().getCrop(i, j).getStatus() != 0 && tractorUnit.getFarm().getCrop(i, j).getStatus() != 1) - { - spriteBatch.Draw(Crops[tractorUnit.getFarm().getCrop(i, j).getCropType()], new Rectangle(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 3, j * (input.getSpacingTile()), input.getTileSize() / 3, input.getTileSize() / 3), Color.White); + if (tractorUnit.getFarm().getCrop(i, j).getStatus() != 0 && tractorUnit.getFarm().getCrop(i, j).getStatus() != 1) + { + if ((tractorUnit.getFarm().getCrop(i, j).getStatus() == 3)) + { + spriteBatch.Draw(ProgressionBar, new Rectangle(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 3, j * (input.getSpacingTile()), input.getTileSize() / 3, input.getTileSize()), Color.White); + spriteBatch.Draw(ProgressionBarStatus, new Rectangle(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 4, j * (input.getSpacingTile()) + input.getTileSize() / 3, input.getTileSize() / 4, tractorUnit.getFarm().getCrop(i, j).getCropTimerBar((input.getTileSize())) + 1), Color.White); + } + spriteBatch.Draw(Crops[tractorUnit.getFarm().getCrop(i, j).getCropType()], new Rectangle((int)(i * (input.getSpacingTile()) + input.getTileSize() - input.getTileSize() / 2.5), j * (input.getSpacingTile()), (int)(input.getTileSize() / 2.5), input.getTileSize() / 3), Color.White); + } } } diff --git a/Game1/Game1.csproj b/Game1/Game1.csproj index 6ee09c1..0658f70 100644 --- a/Game1/Game1.csproj +++ b/Game1/Game1.csproj @@ -17,6 +17,21 @@ + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true x64 @@ -63,10 +78,15 @@ MinimumRecommendedRules.ruleset true + + false + + + @@ -92,8 +112,9 @@ - + + @@ -173,6 +194,9 @@ + + 2.5.3 + 2.3.1 @@ -210,6 +234,18 @@ 4.11.0 + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + +