Czoko_Smieciarka/Trunk/MonoGameView/DataModels/Models/GarbageCollector.cs

34 lines
1.2 KiB
C#
Raw Normal View History

2019-04-22 10:39:00 +02:00
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.GarbageCollector;
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.TrashCans;
2019-04-22 10:39:00 +02:00
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2019-03-13 18:12:45 +01:00
2019-04-22 10:39:00 +02:00
namespace CzokoŚmieciarka.MonoGameView.DataModels.Models
2019-03-13 18:12:45 +01:00
{
2019-04-22 10:39:00 +02:00
public class GarbageCollector : AGarbageCollector, IDrawables
2019-03-13 18:12:45 +01:00
{
2019-04-22 14:17:44 +02:00
public GarbageCollector(Coords c, List<AGarbageCollectorContainer> l, int rows, int cols) : base(c,l,rows,cols)
2019-03-13 18:12:45 +01:00
{
2019-04-22 10:39:00 +02:00
}
2019-04-22 14:17:44 +02:00
public void Draw(ContentManager content, SpriteBatch batch,int size)
2019-04-22 10:39:00 +02:00
{
2019-04-22 14:17:44 +02:00
batch.Draw(content.Load<Texture2D>("collector"), new Rectangle(Coords.X*500/size, Coords.Y*500/size, 500/size, 500/size), Color.White);
2019-04-22 10:39:00 +02:00
}
2019-04-22 14:17:44 +02:00
public override object Clone(ContentManager content)
2019-04-22 10:39:00 +02:00
{
var cloneList = new List<AGarbageCollectorContainer>();
2019-04-22 14:17:44 +02:00
return new GarbageCollector(new Coords(Coords.X,Coords.Y), cloneList, rows,columns);
2019-03-13 18:12:45 +01:00
}
}
}