Example #1
0
 public static Tileset GetAsListElement(Tileset tileset)
 {
     if (Contains(tileset.Name))
         return tilesets[tilesets.IndexOf(tileset)];
     else
     {
         tilesets.Add(tileset);
         return tileset;
     }
 }
Example #2
0
 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);
 }
Example #3
0
 public static void Remove(Tileset tileset)
 {
     tilesets.Remove(tileset);
 }
Example #4
0
 public static void Add(Tileset tileset)
 {
     tilesets.Add(tileset);
 }
Example #5
0
 public bool Equals(Tileset tileset)
 {
     return this.Name.Equals(tileset.Name);
 }