/// <summary> /// ワールド読み込み /// </summary> /// <param name="path">ワールドパス</param> public static void Load(string path) { if (IsLoading.Value) { return; } IslandsData.Reset(); SpawnersData.Reset(); ScoreData.Reset(); FolderName.Value = System.IO.Path.GetFileName(path); IsLoading.Value = true; LoadingProgress.Value = 0; Path.Value = path; var count = 0; Task.Run(() => { try { WorldData = AnvilWorld.Load(path); IslandsData.Load(ref count); SpawnersData.Load(ref count); ScoreData.Load(); // 100%を見せたいからという理由だけで0.3秒遅延させる System.Threading.Thread.Sleep(300); } catch { Path.Value = null; IsError.Value = true; } finally { IsLoading.Value = false; } }); }