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

29 lines
794 B
C#
Raw Normal View History

using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2019-04-22 14:17:44 +02:00
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
2019-04-22 14:55:47 +02:00
using MonoGameView.DataModels.Models;
namespace CzokoŚmieciarka.MonoGameView.DataModels.Models
{
2019-04-22 14:55:47 +02:00
public class Road1 :IRoad1, IDrawables
{
2019-04-22 14:17:44 +02:00
private Coords Coords;
public Road1(Coords coords)
{
Coords = coords;
}
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("road1"), new Rectangle(Coords.X * 500 / size, Coords.Y * 500 / size, 500 / size, 500 / size), Color.White);
2019-04-22 14:17:44 +02:00
}
}
}