Esempio n. 1
0
 public void AddLayer(string LayerName, string LayerTexture)
 {
     //geometry
     if (GeometryList.ContainsKey(LayerName))
     {
         GeometryList.Remove(LayerName);
     }
     GeometryList.Add(LayerName, new Geometry2D(LayerName, LayerTexture, PX * ScreenWidth, PY * ScreenHeight, SX * ScreenWidth, SY * ScreenHeight, TX, TY, TSX, TSY, Z));
 }
        public void AddLayer(string LayerName, string LayerTexture, int TileX, int TileY, float TileZ, int TileSizeX, int TileSizeY, int PixelScale)
        {
            //geometry
            if (GeometryList.ContainsKey(LayerName))
            {
                GeometryList.Remove(LayerName);
            }
            GeometryList.Add(LayerName, new Geometry2D(LayerName, LayerTexture, PX * ScreenWidth, PY * ScreenHeight, SX * ScreenWidth, SY * ScreenHeight, TX, TY, TSX, TSY, Z + TileZ));

            Layers.Add(new Layer(TileX, TileY, TileZ, TileSizeX, TileSizeY, LayerName, PixelScale));
            Layers = Layers.OrderBy(x => x.TileZ).ToList();
        }
 public void RemoveLayer(string LayerName)
 {
     for (int i = 0; i < Layers.Count; i++)
     {
         if (Layers[i].Name == LayerName)
         {
             Layers.RemoveAt(i);
             break;
         }
     }
     GeometryList.Remove(LayerName);
 }
Esempio n. 4
0
 public void RemoveLayer(string LayerName)
 {
     GeometryList.Remove(LayerName);
 }