public void SetupWall(MapMaterialManager material_manager, string wall_default_material_key) { var copy_walls = this.CopyWalls(); // 壁をデフォルトで初期化する var wdm = material_manager.wall_materials[wall_default_material_key]; var i = 0; i = 0; foreach (var wall_line in walls) { Wall.DirectionID direction_id = Wall.DirectionID.S; switch (i) { case 1: direction_id = Wall.DirectionID.E; break; case 2: direction_id = Wall.DirectionID.N; break; case 3: direction_id = Wall.DirectionID.W; break; } wall_line.Clear(); var h = under[i]; for (var j = 0; j < h; j++) { var wall = new Wall(map_x, map_y, height - h + j, direction_id); var h_now = 3 - (height - h + j) % 4; // 2.5で、画像チップの四分の一の高さとする、そのいちを決める wall.material = wdm; wall.panel.SetColor(255, 255, 255, 255); wall.panel.SetTexture(wdm.image_handle); wall.panel.SetSpecularColor(255, 70, 70, 70); wall.panel.SetUV(new SDPoint(0, h_now * 8), new SDPoint(32, 8)); wall_line.Add(wall); } i++; } PastWallMaterial(copy_walls); }
public void Setup(MapMaterialManager material_manager, string wall_default_material_key) { SetupWall(material_manager, wall_default_material_key); ground_material = material_manager.ground_materials[""]; // ダミーを設定 }