void Update() { if (loadProgress.finished) { if (loadProgress.exception != null) { string message = BuildExceptionMessage(loadProgress.exception); ScreenMessage.Show(message); } else { ScreenMessage.Hide(); Instantiate(mainMenuPrefab); } Destroy(this); } else { ScreenMessage.Show("Loading... "); if (Input.GetKeyDown(KeyCode.Escape)) { GameManager.QuitGame(); } } }
void Awake() { try { Mpq.AddArchive("d2exp.mpq"); Mpq.AddArchive("d2data.mpq"); Mpq.AddArchive("d2char.mpq"); Mpq.AddArchive("d2sfx.mpq", optional: true); Mpq.AddArchive("d2music.mpq", optional: true); Mpq.AddArchive("d2xMusic.mpq", optional: true); Mpq.AddArchive("d2xtalk.mpq", optional: true); Mpq.AddArchive("d2speech.mpq", optional: true); } catch (System.IO.FileNotFoundException e) { string message = BuildMessage(e.Message); ScreenMessage.Show(message); return; } Datasheet.SetLocation(typeof(BodyLoc), "data/global/excel/bodylocs.txt"); Datasheet.SetLocation(typeof(SoundInfo), "data/global/excel/Sounds.txt"); EngineData.LoadAll(); Instantiate(mainMenuPrefab); }
void Awake() { Materials.Initialize(); AudioManager.Initialize(); Datasheet.SetLocation(typeof(BodyLoc), "data/global/excel/bodylocs.txt"); Datasheet.SetLocation(typeof(SoundInfo), "data/global/excel/Sounds.txt"); var dataLoader = new DataLoader(paths); loadProgress = dataLoader.LoadAll(); ScreenMessage.Show("Loading... "); }