private void UpdateEnemyList() { if (arenaData != null) { List <QuestTable.QuestTableData> questDataArray = arenaData.GetQuestDataArray(); SetTable(UI.TBL_LIST, "QuestArenaRoomEnemyListItem", questDataArray.Count, false, delegate(int i, Transform t, bool b) { InitEnemyItem(i, t, b, questDataArray[i]); }); } }
private IEnumerator StartPredownload() { SetActive((Enum)UI.BTN_CREATE, false); SetActive((Enum)UI.BTN_CREATE_OFF, false); List <ResourceInfo> list = new List <ResourceInfo>(); List <QuestTable.QuestTableData> questDataArray = arenaData.GetQuestDataArray(); if (!questDataArray.IsNullOrEmpty()) { for (int j = 0; j < questDataArray.Count; j++) { uint mapId = questDataArray[j].mapId; FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(mapId); if (fieldMapData == null) { yield break; } string stageName = fieldMapData.stageName; if (string.IsNullOrEmpty(stageName)) { stageName = "ST011D_01"; } StageTable.StageData stageData = Singleton <StageTable> .I.GetData(stageName); if (stageData == null) { yield break; } list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SCENE, stageData.scene)); list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SKY, stageData.sky)); if (!string.IsNullOrEmpty(stageData.cameraLinkEffect)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffect)); } if (!string.IsNullOrEmpty(stageData.cameraLinkEffectY0)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffectY0)); } if (!string.IsNullOrEmpty(stageData.rootEffect)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.rootEffect)); } for (int i = 0; i < 8; i++) { if (!string.IsNullOrEmpty(stageData.useEffects[i])) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.useEffects[i])); } } EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questDataArray[j].enemyID[0]); int bodyId = enemyData.modelId; string bodyName = ResourceName.GetEnemyBody(bodyId); string matName = ResourceName.GetEnemyMaterial(bodyId); string animName = ResourceName.GetEnemyAnim(enemyData.animId); if (!string.IsNullOrEmpty(bodyName)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MODEL, bodyName)); } if (!string.IsNullOrEmpty(matName)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MATERIAL, bodyName)); } if (!string.IsNullOrEmpty(animName)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_ANIM, animName)); } if (!string.IsNullOrEmpty(enemyData.baseEffectName)) { list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, enemyData.baseEffectName)); } } if (list.Find((ResourceInfo x) => !MonoBehaviourSingleton <ResourceManager> .I.IsCached(x.category, x.packageName)) != null) { RequestEvent("ASSET_DOWNLOAD", StringTable.Get(STRING_CATEGORY.COMMON_DIALOG, 3000u)); SetActive((Enum)UI.BTN_CREATE_OFF, true); LoadingQueue loadQueue = new LoadingQueue(this); foreach (ResourceInfo item in list) { if (!string.IsNullOrEmpty(item.packageName) && !MonoBehaviourSingleton <ResourceManager> .I.IsCached(item.category, item.packageName)) { ResourceManager.downloadOnly = true; loadQueue.Load(item.category, item.packageName, null, false); ResourceManager.downloadOnly = false; yield return((object)loadQueue.Wait()); } } } bool pushEnable = true; SetActive((Enum)UI.BTN_CREATE, pushEnable); SetActive((Enum)UI.BTN_CREATE_OFF, !pushEnable); } }