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

36 lines
892 B
C#
Raw Normal View History

2019-04-22 14:17:44 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces;
using CzokoŚmieciarka.MonoGameView.DataModels.Models;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace MonoGameView.DataModels.Models
{
public class Grass : IDrawables
{
private Coords Coords;
public Grass(Coords coords)
{
Coords = coords;
}
2019-04-23 06:32:35 +02:00
public object Clone()
{
return new Grass((Coords)Coords.Clone());
}
2019-04-22 14:55:47 +02:00
public void Draw(SpriteBatch batch, int size)
2019-04-22 14:17:44 +02:00
{
2019-04-22 14:55:47 +02:00
batch.Draw(ImageContainer.GetImage("grass"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size, 500 / size, 500 / size), Color.White);
2019-04-22 14:17:44 +02:00
}
2019-04-23 06:32:35 +02:00
2019-04-22 14:17:44 +02:00
}
}