public Tile(Vector2 id, ref Texture2D Sheet, int x, int y, int Width, int Height) { tileId = id; sheet = Sheet; position = new Vector2(x*Width, y*Height); bounding = new Rectangle((int)position.X, (int)position.Y, Width, Height); width = Width; height = Height; ability = null; }
public void setAbility(int id, IAbility newAbility) { if (abilities.ContainsKey(id)) { abilities[id] = newAbility; } else { abilities.Add(id, newAbility); } }
public void setCell(IAbility ability, int x, int y) { grid[y, x].Ability = ability; grid[y, x].Occupied = true; }