public void Touch() { for (int y = 0; y < this.Height; y++) { BusyWin.SetMessage("マップ読み込み中... " + y + " / " + this.Height); for (int x = 0; x < this.Width; x++) { TileImage tile = this.Table[y][x].Tile; if (tile.NormalImage.ImageData == null) { } // touch if (tile.SelectedImage.ImageData == null) { } // touch } } }
public void Init() { this.DefaultTile = new TileImage( new ImageFile(Consts.RESOURCE_DIR + "\\normal\\empty.bmp"), new ImageFile(Consts.RESOURCE_DIR + "\\selected\\empty.bmp") ); BusyWin.SetMessage("背景オブジェクトを読み込んでいます..."); { string[] niDirs = Directory.GetDirectories(Consts.RESOURCE_DIR + "\\normal\\map"); string[] siDirs = Directory.GetDirectories(Consts.RESOURCE_DIR + "\\selected\\map"); for (int index = 0; index < niDirs.Length; index++) { string niDir = niDirs[index]; string siDir = siDirs[index]; this.MapTableList.Add(new MapTable(niDir, siDir, index)); } // Check ... if (this.MapTableList.Count < Consts.MAPTABLE_NUM_MIN) { throw new Exception("マップテーブルが少なすぎます。"); } } BusyWin.SetMessage("敵オブジェクトを読み込んでいます..."); { ResourceData reader = new ResourceData(Consts.DATA_DIR + "\\Enemy.txt"); DC.I.EnemyCommonParamPromptList = reader.ReadBlock(); string[] files = Directory.GetFiles(Consts.RESOURCE_DIR + "\\enemy"); string[] niFiles = Directory.GetFiles(Consts.RESOURCE_DIR + "\\normal\\enemy"); string[] siFiles = Directory.GetFiles(Consts.RESOURCE_DIR + "\\selected\\enemy"); for (int index = 0; ; index++) { string name = reader.ReadValue(); if (name == ResourceData.DEFAULT_VALUE) { break; } this.EnemyList.Add(new Enemy( new ImageFile(files[index]), new TileImage( new ImageFile(niFiles[index]), new ImageFile(siFiles[index]) ), name, reader.ReadBlock() )); } } BusyWin.SetMessage("フィールドマップを読み込んでいます..."); { ResourceData backTable = new ResourceData(Consts.DATA_DIR + "\\WallData.txt"); ResourceData frontTable = new ResourceData(Consts.DATA_DIR + "\\StageData.txt"); DC.I.FieldMap = new FieldTable(backTable, frontTable); } BusyWin.SetMessage("初期化を続行しています..."); { ResourceData reader = new ResourceData(Consts.DATA_DIR + "\\Settings.txt"); DC.I.FieldScrollMax = Tools.ParseInt(reader.ReadValue(), -1, Consts.FIELDMAP_W_MIN, Consts.FIELDMAP_W_MAX); } }