Ejemplo n.º 1
0
        public void Load(string zonPath, string zscBuildingPath, string zscDecorationPath, string mapFolder, int minSizeX, int minSizeY, int maxSizeX, int maxSizeY)
        {
            ZON zON  = ContentManager.Instance().GetZON(zonPath);
            ZSC zSC  = ContentManager.Instance().GetZSC(zscBuildingPath);
            ZSC zSC2 = ContentManager.Instance().GetZSC(zscDecorationPath);

            this.decorationBlocks = new DecorationBlock[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
            this.mapBlocks        = new MapBlock[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
            this.isView           = new bool[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
            for (int i = minSizeX; i <= maxSizeX; i++)
            {
                for (int j = minSizeY; j <= maxSizeY; j++)
                {
                    string himName = string.Concat(new object[]
                    {
                        i,
                        "_",
                        j,
                        ".HIM"
                    });
                    string tilName = string.Concat(new object[]
                    {
                        i,
                        "_",
                        j,
                        ".TIL"
                    });
                    MapBlock mapBlock = new MapBlock(this.graphics);
                    mapBlock.Load(zON, mapFolder, himName, tilName, new Vector2((float)i, (float)j));
                    this.mapBlocks[i - minSizeX, j - minSizeY] = mapBlock;
                    string ifoName = string.Concat(new object[]
                    {
                        i,
                        "_",
                        j,
                        ".IFO"
                    });
                    DecorationBlock decorationBlock = new DecorationBlock(this.graphics);
                    decorationBlock.Load(ifoName, mapFolder, zSC2, zSC, new Vector2((float)i, (float)j));
                    this.decorationBlocks[i - minSizeX, j - minSizeY] = decorationBlock;
                }
            }
            this.GenerateIndice();
        }
Ejemplo n.º 2
0
 public void Load(string zonPath, string zscBuildingPath, string zscDecorationPath, string mapFolder, int minSizeX, int minSizeY, int maxSizeX, int maxSizeY)
 {
     ZON zON = ContentManager.Instance().GetZON(zonPath);
     ZSC zSC = ContentManager.Instance().GetZSC(zscBuildingPath);
     ZSC zSC2 = ContentManager.Instance().GetZSC(zscDecorationPath);
     this.decorationBlocks = new DecorationBlock[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
     this.mapBlocks = new MapBlock[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
     this.isView = new bool[maxSizeX - minSizeX + 1, maxSizeY - minSizeY + 1];
     for (int i = minSizeX; i <= maxSizeX; i++)
     {
         for (int j = minSizeY; j <= maxSizeY; j++)
         {
             string himName = string.Concat(new object[]
             {
                 i,
                 "_",
                 j,
                 ".HIM"
             });
             string tilName = string.Concat(new object[]
             {
                 i,
                 "_",
                 j,
                 ".TIL"
             });
             MapBlock mapBlock = new MapBlock(this.graphics);
             mapBlock.Load(zON, mapFolder, himName, tilName, new Vector2((float)i, (float)j));
             this.mapBlocks[i - minSizeX, j - minSizeY] = mapBlock;
             string ifoName = string.Concat(new object[]
             {
                 i,
                 "_",
                 j,
                 ".IFO"
             });
             DecorationBlock decorationBlock = new DecorationBlock(this.graphics);
             decorationBlock.Load(ifoName, mapFolder, zSC2, zSC, new Vector2((float)i, (float)j));
             this.decorationBlocks[i - minSizeX, j - minSizeY] = decorationBlock;
         }
     }
     this.GenerateIndice();
 }