コード例 #1
0
 public void ToggleLayer(string LayerName)
 {
     if (GeometryList.ContainsKey(LayerName))
     {
         GeometryList[LayerName].HasCull = !GeometryList[LayerName].HasCull;
     }
 }
コード例 #2
0
 public Geometry2D GetGeometry(string Name)
 {
     if (GeometryList.ContainsKey(Name))
     {
         return(GeometryList[Name]);
     }
     return(null);
 }
コード例 #3
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));
 }
コード例 #4
0
        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();
        }