Czoko_Smieciarka/Trunk/MonoGameView/DataModels/Models/GarbageCollector.cs
Michał Dulski 9668e23646 ło panie
2019-04-22 14:17:44 +02:00

34 lines
1.2 KiB
C#

using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.GarbageCollector;
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.TrashCans;
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;
namespace CzokoŚmieciarka.MonoGameView.DataModels.Models
{
public class GarbageCollector : AGarbageCollector, IDrawables
{
public GarbageCollector(Coords c, List<AGarbageCollectorContainer> l, int rows, int cols) : base(c,l,rows,cols)
{
}
public void Draw(ContentManager content, SpriteBatch batch,int size)
{
batch.Draw(content.Load<Texture2D>("collector"), new Rectangle(Coords.X*500/size, Coords.Y*500/size, 500/size, 500/size), Color.White);
}
public override object Clone(ContentManager content)
{
var cloneList = new List<AGarbageCollectorContainer>();
return new GarbageCollector(new Coords(Coords.X,Coords.Y), cloneList, rows,columns);
}
}
}