Пример #1
0
        private static void DownloadAll()
        {
            var downloader = new Action <float>[]
            {
                (p) => Download(typeof(MasterDataItem), p, m => ItemEditor.Load(m.Item), false),
                (p) => Download(typeof(MasterDataCell), p, m => CellEditor.Load(m.Cell), false),
                (p) => Download(typeof(MasterDataCellEvent), p, m => CellEventEditor.Load(m.CellEvent), false),
                (p) => Download(typeof(MasterDataLevelUpCost), p, m => LevelUpCostEditor.Load(m.LevelUpCost), false),
                (p) => Download(typeof(MasterDataHousingLevelParameter), p, m => HousingLevelParameterEditor.Load(m.HousingLevelParameter), false),
                (p) => Download(typeof(MasterDataFacilityLevelParameter), p, m => FacilityLevelParameterEditor.Load(m.FacilityLevelParameter), false),
                (p) => Download(typeof(MasterDataRoadLevelParameter), p, m => RoadLevelParameterEditor.Load(m.RoadLevelParameter), false),
                (p) => Download(typeof(MasterDataUnlockCellEvent), p, m => UnlockCellEventEditor.Load(m.UnlockCellEvent), false),
                (p) => Download(typeof(MasterDataCellBundle), p, m => CellBundleEditor.Load(m.CellBundle), false),
                (p) => Download(typeof(MasterDataUnlockCellBundle), p, m => UnlockCellBundleEditor.Load(m.UnlockCellBundle), false),
            };

            for (var i = 0; i < downloader.Length; i++)
            {
                var progress = (float)i / downloader.Length;
                downloader[i](progress);
            }

            EditorUtility.ClearProgressBar();
        }
Пример #2
0
 private static void DownloadUnlockCellBundle()
 {
     Download(typeof(MasterDataUnlockCellBundle), 1.0f, m => UnlockCellBundleEditor.Load(m.UnlockCellBundle));
 }