41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
|
|
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
|
using CzokoŚmieciarka.DataModels.Models;
|
|
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 MonoGameView
|
|
{
|
|
public class GarbageCollector : AGarbageCollector
|
|
{
|
|
public Texture2D Image { get; set; }
|
|
public GarbageCollector(ContentManager content, Coords c, List<AGarbageCollectorContainer> l, int rows, int cols) : base(c,l,rows,cols)
|
|
{
|
|
Image = content.Load<Texture2D>("collector");
|
|
}
|
|
public GarbageCollector(Texture2D image, Coords c, List<AGarbageCollectorContainer> l, int rows, int cols) : base(c, l, rows, cols)
|
|
{
|
|
Image = image;
|
|
}
|
|
|
|
|
|
public void Draw(SpriteBatch batch)
|
|
{
|
|
batch.Draw(Image, new Vector2(Coords.X*50, Coords.Y*50), Color.White);
|
|
}
|
|
|
|
|
|
public override object Clone()
|
|
{
|
|
var cloneList = new List<AGarbageCollectorContainer>();
|
|
return new GarbageCollector(Image, new Coords(Coords.X,Coords.Y), cloneList, rows,columns);
|
|
}
|
|
}
|
|
}
|