Esempio n. 1
0
        // 초기화
        public void Initialize()
        {
            // 타일 초기화
            imageIniter.SetSize(height, width);
            imageIniter.TileInitialize();

            tileArray = new Tile.Tile[height, width];

            int ind = 0;

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    Tile.Tile targetTile = (imageIniter.tileArray[i, j] as Transform).GetComponent <Tile.Tile>();


                    tileArray[i, j] = targetTile;
                    targetTile.Initialize(j, i, tileSpriteIndArr[ind++]);
                }
            }
        }
Esempio n. 2
0
        // 레벨 셀렉터 초기화
        public void InitLevelSelecter(ImageIniter targetIminiter)
        {
            imageIniter = targetIminiter;
            lastLevel   = PlayerPrefs.GetInt("LastLevel", 1);
            level       = 0;

            // 타일 초기화
            imageIniter.SetSize(height, width);
            imageIniter.TileInitialize();

            int lev = 1;


            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    LevelSelecter targetSelecter = (imageIniter.tileArray[i, j] as Transform).GetComponent <LevelSelecter>();


                    targetSelecter.SetLevel(lev++);
                }
            }
        }