using System; using System.Collections.Generic; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; namespace OperationDrawDown { public class Cell { public static int scale; public string id; public Texture2D texture; public Color color; public bool walkable; public int x; public int y; public Cell(int tileX, int tileY) { this.id = "Blank"; this.texture = Engine.content.Load("_textures/SelectionRectangle"); this.color = Color.TransparentBlack; this.walkable = false; this.x = tileX; this.y = tileY; } public Cell(string tileID, Texture2D tileTexture, Color tileColor, bool tileWalkable) { this.id = tileID; this.texture = tileTexture; this.color = tileColor; this.walkable = tileWalkable; } public Cell(string tileID, Texture2D tileTexture, Color tileColor, bool tileWalkable, int tileX, int tileY) { this.id = tileID; this.texture = tileTexture; this.color = tileColor; this.walkable = tileWalkable; this.x = tileX; this.y = tileY; } public Cell Clone(int x, int y) { return new Cell(this.id, this.texture, this.color, this.walkable, x, y); } public void Draw() { Engine.spriteBatch.Draw( this.texture, new Rectangle( this.x * scale, this.y * scale, scale, scale), Color.White ); } public void Move(int posX, int posY) { this.x = posX; this.y = posY; } } }