public static Tileset GetAsListElement(Tileset tileset) { if (Contains(tileset.Name)) return tilesets[tilesets.IndexOf(tileset)]; else { tilesets.Add(tileset); return tileset; } }
public static void ApplyTransparency(Tileset tileset) { Color[] pixel = new Color[tileset.Width * tileset.Height]; tileset.Texture.GetData<Color>(pixel); for (int i = 0; i < pixel.Count(); i++) { if (pixel[i].Equals(tileset.Transparency)) pixel[i] = new Color(); } tileset.Texture.SetData<Color>(pixel); }
public static void Remove(Tileset tileset) { tilesets.Remove(tileset); }
public static void Add(Tileset tileset) { tilesets.Add(tileset); }
public bool Equals(Tileset tileset) { return this.Name.Equals(tileset.Name); }