diff --git a/Trunk/MonoGameView/Game1.cs b/Trunk/MonoGameView/Game1.cs index 048cb3f..287367a 100644 --- a/Trunk/MonoGameView/Game1.cs +++ b/Trunk/MonoGameView/Game1.cs @@ -148,7 +148,15 @@ namespace CzokoŚmieciarka.MonoGameView } */ // TODO: Add your update logic here - + var collectorDictionary = new Dictionary + { + {"Garbage Collector Info", ""}, + {collector.TrashContainers.ElementAtOrDefault(0).TypeOfGarbage.GarbageType.ToString(), collector.TrashContainers.ElementAtOrDefault(0).Garbage.Weight.ToString()}, + {collector.TrashContainers.ElementAtOrDefault(1).TypeOfGarbage.GarbageType.ToString(), collector.TrashContainers.ElementAtOrDefault(1).Garbage.Weight.ToString()}, + {collector.TrashContainers.ElementAtOrDefault(2).TypeOfGarbage.GarbageType.ToString(), collector.TrashContainers.ElementAtOrDefault(2).Garbage.Weight.ToString()}, + {collector.TrashContainers.ElementAtOrDefault(3).TypeOfGarbage.GarbageType.ToString(), collector.TrashContainers.ElementAtOrDefault(3).Garbage.Weight.ToString()} + }; + displayer.Content = collectorDictionary; base.Update(gameTime); } @@ -165,15 +173,11 @@ namespace CzokoŚmieciarka.MonoGameView { for (int y = 0; y < size; y++) { - //if (grid[x, y] is Road1) spriteBatch.Draw(road1, new Rectangle(x*500 / size, y*500 / size, 500/size, 500/size),Color.White); - //else if (grid[x,y] is Road2) spriteBatch.Draw(road2, new Rectangle(x * 500 / size, y * 500 / size, 500 / size, 500 / size), Color.White); - //else if (grid[x, y] is House) spriteBatch.Draw(house, new Rectangle(x * 500 / size, y * 500 / size, 500 / size, 500 / size), Color.White); - //else spriteBatch.Draw(grass, new Rectangle(x * 500 / size, y * 500 / size, 500 / size, 500 / size), Color.White); grid[x, y].Draw(spriteBatch, size); } } collector.Draw(spriteBatch, size); - + Display(displayer.Content); spriteBatch.End(); // TODO: Add your drawing code here @@ -184,18 +188,18 @@ namespace CzokoŚmieciarka.MonoGameView /// /// /// - //public void Display(Dictionary info) - //{ - // int x = 510; - // int y = 10; - // foreach (KeyValuePair item in info) - // { - // spriteBatch.DrawString(font, item.Key, new Vector2(x, y),Color.Black); - // y += 15; - // spriteBatch.DrawString(font, item.Value, new Vector2(x, y), Color.White); - // y += 30; + public void Display(Dictionary info) + { + int x = 510; + int y = 10; + foreach (KeyValuePair item in info) + { + spriteBatch.DrawString(font, item.Key, new Vector2(x, y), Color.Black); + y += 15; + spriteBatch.DrawString(font, item.Value, new Vector2(x, y), Color.White); + y += 30; - // } - //} + } + } } }