Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame
This commit is contained in:
commit
b9771b34b6
@ -44,6 +44,18 @@
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:glass.png
|
||||
|
||||
#begin glassBar.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:glassBar.png
|
||||
|
||||
#begin grass.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
@ -80,6 +92,18 @@
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:organic.png
|
||||
|
||||
#begin organicBar.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:organicBar.png
|
||||
|
||||
#begin paper.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
@ -92,6 +116,18 @@
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:paper.png
|
||||
|
||||
#begin paperBar.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:paperBar.png
|
||||
|
||||
#begin plasticmetal.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
@ -104,6 +140,18 @@
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:plasticmetal.png
|
||||
|
||||
#begin plasticMetalBar.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:plasticMetalBar.png
|
||||
|
||||
#begin road1.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
BIN
Trunk/MonoGameView/Content/glassBar.png
Normal file
BIN
Trunk/MonoGameView/Content/glassBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 197 B |
BIN
Trunk/MonoGameView/Content/organicBar.png
Normal file
BIN
Trunk/MonoGameView/Content/organicBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 B |
BIN
Trunk/MonoGameView/Content/paperBar.png
Normal file
BIN
Trunk/MonoGameView/Content/paperBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 B |
BIN
Trunk/MonoGameView/Content/plasticMetalBar.png
Normal file
BIN
Trunk/MonoGameView/Content/plasticMetalBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 B |
@ -25,6 +25,11 @@ namespace CzokoŚmieciarka.MonoGameView.DataModels.Models
|
||||
public void Draw(SpriteBatch batch, int size)
|
||||
{
|
||||
batch.Draw(ImageContainer.GetImage("house"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size, 500 / size, 500 / size), Color.White);
|
||||
batch.Draw(ImageContainer.GetImage("GlassBar"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size, (int)Math.Round(TrashCans.ElementAtOrDefault(0).FillPercent*500) / size, 50 / size), Color.White);
|
||||
batch.Draw(ImageContainer.GetImage("PaperBar"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size + 5, (int)Math.Round(TrashCans.ElementAtOrDefault(1).FillPercent * 500) / size, 50 / size), Color.White);
|
||||
batch.Draw(ImageContainer.GetImage("PlasticMetalBar"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size + 10, (int)Math.Round(TrashCans.ElementAtOrDefault(2).FillPercent * 500) / size, 50 / size), Color.White);
|
||||
batch.Draw(ImageContainer.GetImage("OrganicBar"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size + 15, (int)Math.Round(TrashCans.ElementAtOrDefault(3).FillPercent * 500) / size, 50 / size), Color.White);
|
||||
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
|
@ -25,7 +25,10 @@ namespace MonoGameView.DataModels.Models
|
||||
_container.Images.Add("Paper", content.Load<Texture2D>("paper"));
|
||||
_container.Images.Add("PlasticMetal", content.Load<Texture2D>("plasticmetal"));
|
||||
_container.Images.Add("Organic", content.Load<Texture2D>("organic"));
|
||||
|
||||
_container.Images.Add("GlassBar", content.Load<Texture2D>("glassBar"));
|
||||
_container.Images.Add("PaperBar", content.Load<Texture2D>("paperBar"));
|
||||
_container.Images.Add("PlasticMetalBar", content.Load<Texture2D>("plasticMetalBar"));
|
||||
_container.Images.Add("OrganicBar", content.Load<Texture2D>("organicBar"));
|
||||
}
|
||||
|
||||
public static Texture2D GetImage(string s)
|
||||
|
@ -148,7 +148,15 @@ namespace CzokoŚmieciarka.MonoGameView
|
||||
}
|
||||
*/
|
||||
// TODO: Add your update logic here
|
||||
|
||||
var collectorDictionary = new Dictionary<string, string>
|
||||
{
|
||||
{"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,33 +173,10 @@ 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);
|
||||
displayer.Content = new Dictionary<string, string>();
|
||||
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.ElementAtOrDefault(0).Garbage.TypeOfGarbage.GarbageType.ToString(), house.TrashCans.ElementAtOrDefault(0).Garbage.Volume.ToString());
|
||||
displayer.Content.Add(house.Coords.X.ToString() + ":" + house.Coords.Y.ToString() + house.TrashCans.ElementAtOrDefault(1).Garbage.TypeOfGarbage.GarbageType.ToString(), house.TrashCans.ElementAtOrDefault(1).Garbage.Volume.ToString());
|
||||
displayer.Content.Add(house.Coords.X.ToString() + ":" + house.Coords.Y.ToString() + house.TrashCans.ElementAtOrDefault(2).Garbage.TypeOfGarbage.GarbageType.ToString(), house.TrashCans.ElementAtOrDefault(2).Garbage.Volume.ToString());
|
||||
displayer.Content.Add(house.Coords.X.ToString() + ":" + house.Coords.Y.ToString() + house.TrashCans.ElementAtOrDefault(3).Garbage.TypeOfGarbage.GarbageType.ToString(), house.TrashCans.ElementAtOrDefault(3).Garbage.Volume.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
Display(displayer.Content);
|
||||
|
||||
spriteBatch.End();
|
||||
@ -209,7 +194,7 @@ namespace CzokoŚmieciarka.MonoGameView
|
||||
int y = 10;
|
||||
foreach (KeyValuePair<string, string> item in info)
|
||||
{
|
||||
spriteBatch.DrawString(font, item.Key, new Vector2(x, y),Color.Black);
|
||||
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;
|
||||
|
@ -174,20 +174,6 @@
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Paper
|
||||
@ -216,6 +202,20 @@
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
</TrashCans>
|
||||
</Object>
|
||||
<Object>
|
||||
@ -322,20 +322,6 @@
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
@ -365,6 +351,20 @@
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
</TrashCans>
|
||||
</Object>
|
||||
<Object>
|
||||
@ -733,7 +733,7 @@
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>
|
||||
Glass
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
@ -864,7 +864,7 @@
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>
|
||||
Glass
|
||||
Paper
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
@ -891,7 +891,7 @@
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>
|
||||
Glass
|
||||
PlasticMetal
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
@ -1255,20 +1255,6 @@
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
@ -1298,6 +1284,20 @@
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
</TrashCans>
|
||||
</Object>
|
||||
<Object>
|
||||
@ -1404,20 +1404,6 @@
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
@ -1447,6 +1433,20 @@
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
<Can>
|
||||
<GarbageType>
|
||||
Organic
|
||||
</GarbageType>
|
||||
<Density>
|
||||
1
|
||||
</Density>
|
||||
<ProcessingTimePerUnit>
|
||||
1
|
||||
</ProcessingTimePerUnit>
|
||||
<Volume>
|
||||
100
|
||||
</Volume>
|
||||
</Can>
|
||||
</TrashCans>
|
||||
</Object>
|
||||
<Object>
|
||||
|
Loading…
Reference in New Issue
Block a user