diff --git a/Trunk/MonoGameView/DataModels/Displayer.cs b/Trunk/MonoGameView/DataModels/Displayer.cs new file mode 100644 index 0000000..c734f44 --- /dev/null +++ b/Trunk/MonoGameView/DataModels/Displayer.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MonoGameView.DataModels +{ + public class Displayer + { + public Dictionary Content { get; set; } + } +} diff --git a/Trunk/MonoGameView/Game1.cs b/Trunk/MonoGameView/Game1.cs index feffbba..03b97d6 100644 --- a/Trunk/MonoGameView/Game1.cs +++ b/Trunk/MonoGameView/Game1.cs @@ -6,6 +6,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using System; +using System.CodeDom; using System.Collections.Generic; using System.Linq; using CzokoŚmieciarka.MonoGameView.Algorithms; @@ -37,6 +38,9 @@ namespace CzokoŚmieciarka.MonoGameView List steps; GarbageCollector collector; IDrawables[,] grid; + Displayer displayer = new Displayer(){Content = new Dictionary()}; + + public Game1() { graphics = new GraphicsDeviceManager(this); @@ -169,8 +173,23 @@ namespace CzokoŚmieciarka.MonoGameView } } collector.Draw(spriteBatch, size); - Display(new Dictionary(){["Dupa"] = "123", ["Stefan"] = "555", ["Dupa1"] = "123", ["Stefan1"] = "555", ["Dupa2"] = "123", ["Stefan2"] = "555"}); + displayer.Content = new Dictionary(); + try + { + foreach (var item in grid) + { + if (item is House) + { + var house = item as House; + displayer.Content.Add(house.Coords.X.ToString() + ":" + house.Coords.Y.ToString(), house.TrashCans.LastOrDefault().FillPercent.ToString()); + } + } + } + catch + { + } + Display(displayer.Content); spriteBatch.End(); // TODO: Add your drawing code here diff --git a/Trunk/MonoGameView/MonoGameView.csproj b/Trunk/MonoGameView/MonoGameView.csproj index a2ca8c1..7deca05 100644 --- a/Trunk/MonoGameView/MonoGameView.csproj +++ b/Trunk/MonoGameView/MonoGameView.csproj @@ -47,6 +47,7 @@ +