protected override Boolean LoadExternal() { try { if (!_initialized) { return(false); } Int32 battleZoneId = FF9TextToolAccessor.GetBattleZoneId(); String[] result; if (!_cache.TryGetValue(battleZoneId, out result)) { return(false); } if (result != null) { FF9TextToolAccessor.SetBattleText(result); } return(true); } catch (Exception ex) { Log.Error(ex, $"[{TypeName}] Failed to import resource."); return(false); } }
protected override Boolean LoadInternal() { Int32 battleZoneId = FF9TextToolAccessor.GetBattleZoneId(); String path = EmbadedTextResources.GetCurrentPath("/Battle/" + battleZoneId + ".mes"); String[] text = EmbadedSentenseLoader.LoadSentense(path); if (text != null) { FF9TextToolAccessor.SetBattleText(text); } return(true); }
private static IEnumerable InitializeBattleTextInternal() { Int32 battleZoneId = FF9TextToolAccessor.GetBattleZoneId(); if (battleZoneId == -1) { PersistenSingleton <UIManager> .Instance.SetEventEnable(true); yield return(0); yield break; } FF9TextTool.IsLoading = true; foreach (var state in BattleImporter.LoadAsync()) { yield return(state); } FF9TextTool.IsLoading = false; PersistenSingleton <UIManager> .Instance.SetEventEnable(true); }