protected IEnumerator _Initialize() { questInfo = (GameSection.GetEventData() as QuestInfoData); if (questInfo.questData.tableData.questType == QUEST_TYPE.ORDER) { QuestItemInfo item = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem(questInfo.questData.tableData.questID); if (item != null) { GameSaveData.instance.RemoveNewIconAndSave(ITEM_ICON_TYPE.QUEST_ITEM, item.uniqueID); } } LoadingQueue load_queue = new LoadingQueue(this); if (questInfo != null) { EnemyTable.EnemyData enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)questInfo.questData.tableData.GetMainEnemyID()); if (enemy_data != null) { EnemyLoader.CacheUIElementEffect(load_queue, enemy_data.element); } } load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_new"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_complete"); if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } }
private IEnumerator DoInitialize() { bool is_recv_quest = false; LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_new"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_complete"); InitSearchParam(); QuestAcceptChallengeRoomCondition.ChallengeSearchRequestParam sendParam = new QuestAcceptChallengeRoomCondition.ChallengeSearchRequestParam(); int userLevel = sendParam.enemyLevel = GetEnemyLevelFromUserLevel(); MonoBehaviourSingleton <QuestManager> .I.SendGetChallengeList(sendParam, delegate { ((_003CDoInitialize_003Ec__Iterator6D) /*Error near IL_00a4: stateMachine*/)._003Cis_recv_quest_003E__0 = true; }, false); while (!is_recv_quest) { yield return((object)null); } this.StartCoroutine(CheckLimitQuestItem()); if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } base.Initialize(); }
private IEnumerator DoInitialize() { bool is_recv_quest = false; LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_new"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_complete"); if (MonoBehaviourSingleton <QuestManager> .I.needRequestOrderQuestList) { MonoBehaviourSingleton <QuestManager> .I.SendGetQuestList(delegate { MonoBehaviourSingleton <QuestManager> .I.needRequestOrderQuestList = false; ((_003CDoInitialize_003Ec__Iterator71) /*Error near IL_0075: stateMachine*/)._003Cis_recv_quest_003E__0 = true; }); while (!is_recv_quest) { yield return((object)null); } } this.StartCoroutine(CheckLimitQuestItem()); sortSettings = SortSettings.CreateMemSortSettings(SortBase.DIALOG_TYPE.QUEST, SortSettings.SETTINGS_TYPE.ORDER_QUEST); SHOW_QUEST_REMAIN_LIMIT_SECOND = (float)TimeSpan.FromDays(5.0).TotalSeconds; sortSettings.indivComparison = Compare; if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } base.Initialize(); }
private IEnumerator DoInitalize() { LoadingQueue loadQueue = new LoadingQueue(this); loadQueue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, $"ef_ui_pointresult_{currentData.eventId:D8}"); if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } SetVisibleWidgetEffect(UI.TXT_BANNER, $"ef_ui_pointresult_{currentData.eventId:D8}"); UIVisibleWidgetEffect visibleWidget = bannerCtrl.GetComponent <UIVisibleWidgetEffect>(); visibleWidget.SetRendererQueue(4000); PlayAudio(AUDIO.TITLE_LOGO); ResourceLoad.LoadEventBannerResultTexture(GetCtrl(UI.SPR_LOGO).GetComponent <UITexture>(), (uint)currentData.eventId); ResourceLoad.LoadEventBannerResultBGTexture(GetCtrl(UI.SPR_LOGO_BG).GetComponent <UITexture>(), (uint)currentData.eventId); TweenAlpha logoBGAlpha = GetCtrl(UI.SPR_LOGO_BG).GetComponent <TweenAlpha>(); if (logoBGAlpha != null) { logoBGAlpha.ResetToBeginning(); logoBGAlpha.PlayForward(); } base.Initialize(); }
public static void CacheUIElementEffect(LoadingQueue load_queue, ELEMENT_TYPE element_type) { if (element_type < ELEMENT_TYPE.MAX) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, GetElementEffectName(element_type)); } }
private IEnumerator DoLoadEffect() { LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_shieldgauge_01"); while (load_queue.IsLoading()) { yield return((object)null); } isLoadEffectComplete = true; }
public void Load(LoadingQueue load_queue) { int i = 0; for (int num = effect.Length; i < num; i++) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, effect[i].effectName); } int[] array = (int[])Enum.GetValues(typeof(AUDIO)); int[] array2 = array; foreach (int se_id in array2) { load_queue.CacheSE(se_id, null); } }
private IEnumerator DoInitialize() { if (isFirstBoot && CheckTitleSkip()) { bool wait = true; MonoBehaviourSingleton <LoungeMatchingManager> .I.SendInfo(delegate { ((_003CDoInitialize_003Ec__Iterator14A) /*Error near IL_004b: stateMachine*/)._003Cwait_003E__0 = false; }, false); while (wait) { yield return((object)null); } SetActiveUI(false); base.Initialize(); } else { LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_title_01"); LoadObject lo_director = load_queue.Load(RESOURCE_CATEGORY.CUTSCENE, "InGameTutorialDirector", false); LoadObject lo_tap = load_queue.Load(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_title_04", false); while (load_queue.IsLoading()) { yield return((object)null); } Transform director_t = ResourceUtility.Realizes(lo_director.loadedObject, -1); if (director_t != null) { director = director_t.GetComponent <TutorialBossDirector>(); director.StartLogoAnimation(false, null, delegate { ((_003CDoInitialize_003Ec__Iterator14A) /*Error near IL_0163: stateMachine*/)._003C_003Ef__this.SetActiveUI(true); }); MonoBehaviourSingleton <AppMain> .I.mainCamera.GetComponent <RenderTargetCacher>().set_enabled(false); } else { SetActiveUI(true); } tapPrefab = (lo_tap.loadedObject as GameObject); base.Initialize(); } }
public static IEnumerator InitRoopEffect(LoadingQueue queue, Transform equipItemRoot, SHADER_TYPE shaderType = SHADER_TYPE.NORMAL) { EffectPlayProcessor processor = equipItemRoot.get_gameObject().GetComponentInChildren <EffectPlayProcessor>(); if (processor != null && processor.effectSettings != null) { int j = 0; for (int len = processor.effectSettings.Length; j < len; j++) { if (!string.IsNullOrEmpty(processor.effectSettings[j].effectName)) { queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, processor.effectSettings[j].effectName); } } } yield return((object)queue.Wait()); if (processor != null) { List <Transform> trans = processor.PlayEffect("InitRoop", null); if (trans != null) { for (int i = 0; i < trans.Count; i++) { Utility.SetLayerWithChildren(trans[i], equipItemRoot.get_gameObject().get_layer()); if (shaderType != 0) { Renderer[] rs = trans[i].GetComponentsInChildren <Renderer>(); switch (shaderType) { case SHADER_TYPE.LIGHTWEIGHT: ShaderGlobal.ChangeWantLightweightShader(rs); break; case SHADER_TYPE.UI: ShaderGlobal.ChangeWantUIShader(rs); break; } } } } } }
private IEnumerator DoInitialize() { string greatEffectName = "ef_ui_magi_result_02"; string normalEffectName = "ef_ui_magi_result_01"; string effectName = (!isGreat) ? normalEffectName : greatEffectName; LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, effectName); yield return((object)load_queue.Wait()); Transform effect = EffectManager.GetUIEffect(effectName, GetCtrl(UI.TEX_MODEL), -1f, -2, GetCtrl(UI.TEX_MODEL).GetComponent <UIWidget>()); if (effect != null) { effect.set_localScale(new Vector3(100f, 100f, 1f)); } MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = false; base.Initialize(); }
public static void CacheResources(LoadingQueue loadQueue, FieldMapTable.FieldGimmickPointTableData.GIMMICK_TYPE type, string[] effectNameList, int[] seIdList) { if (MonoBehaviourSingleton <InGameProgress> .I.fieldGimmickModelTable.Get((uint)type) == null) { string fieldGimmickModel = ResourceName.GetFieldGimmickModel(type); if (!string.IsNullOrEmpty(fieldGimmickModel)) { MonoBehaviourSingleton <InGameProgress> .I.fieldGimmickModelTable.Add((uint)type, loadQueue.Load(RESOURCE_CATEGORY.STAGE_GIMMICK, fieldGimmickModel, false)); } foreach (string name in effectNameList) { loadQueue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, name); } foreach (int se_id in seIdList) { loadQueue.CacheSE(se_id, null); } } }
private IEnumerator StartTweenCoroutine(bool is_unlock_portal) { while (GameSceneManager.isAutoEventSkip) { yield return((object)null); } string effectName = "ef_ui_portal_unlock_01"; if (is_unlock_portal) { LoadingQueue load_queue = new LoadingQueue(this); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, effectName); yield return((object)load_queue.Wait()); ResetTween(baseRoot, UI.OBJ_UNLOCK_PORTAL_ROOT, 0); } PlayCompleteTween(delegate { ((_003CStartTweenCoroutine_003Ec__Iterator85) /*Error near IL_00c1: stateMachine*/)._003C_003Ef__this.OnEndCompletetween(((_003CStartTweenCoroutine_003Ec__Iterator85) /*Error near IL_00c1: stateMachine*/).is_unlock_portal, ((_003CStartTweenCoroutine_003Ec__Iterator85) /*Error near IL_00c1: stateMachine*/)._003CeffectName_003E__0); }); CompleteTutorial(); }
public static void Load(LoadingQueue queue, uint evolveId) { queue.CacheSE(10000091, null); switch (evolveId) { case 10000u: queue.CacheSE(MonoBehaviourSingleton <InGameSettingsManager> .I.evolve.type10000.rushSeId, null); queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_wex1_spear_01_01"); queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_wex1_spear_01_02"); queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_wex1_spear_01_03"); break; case 10001u: queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_ast1_twinsword_01"); queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_ast1_twinsword_02"); queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_ast1_twinsword_03"); break; } }
private IEnumerator LoadStageCoroutine(string id) { isLoadingStage = true; insideColliderData = null; isValidInside = false; UnloadStage(); Input.get_gyro().set_enabled(false); currentStageName = id; StageTable.StageData data = null; if (!string.IsNullOrEmpty(id)) { if (!Singleton <StageTable> .IsValid()) { yield break; } data = Singleton <StageTable> .I.GetData(id); if (data == null) { yield break; } LoadingQueue load_queue = new LoadingQueue(this); AssetBundle asset_bundle = null; EffectObject.wait = true; string load_scene_name = data.scene; if (ResourceManager.internalMode) { load_scene_name = $"internal__STAGE_SCENE__{load_scene_name}"; } else if (ResourceManager.isDownloadAssets) { load_queue.Load(RESOURCE_CATEGORY.STAGE_SCENE, data.scene, null, true); yield return((object)load_queue.Wait()); PackageObject package = MonoBehaviourSingleton <ResourceManager> .I.cache.PopCachedPackage(RESOURCE_CATEGORY.STAGE_SCENE.ToAssetBundleName(data.scene)); asset_bundle = ((package == null) ? null : (package.obj as AssetBundle)); } AsyncOperation ao = SceneManager.LoadSceneAsync(load_scene_name); ResourceManager.enableCache = false; LoadObject lo_sky = null; if (!string.IsNullOrEmpty(data.sky)) { lo_sky = load_queue.Load(RESOURCE_CATEGORY.STAGE_SKY, data.sky, false); } ResourceManager.enableCache = true; load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, data.cameraLinkEffect); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, data.cameraLinkEffectY0); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, data.rootEffect); for (int i = 0; i < 8; i++) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, data.useEffects[i]); } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } while (!ao.get_isDone()) { yield return((object)null); } EffectObject.wait = false; if (asset_bundle != null) { asset_bundle.Unload(false); } if (MonoBehaviourSingleton <SceneSettingsManager> .IsValid()) { stageObject = MonoBehaviourSingleton <SceneSettingsManager> .I.get_transform(); stageObject.set_parent(base._transform); } if (lo_sky != null) { skyObject = ResourceUtility.Realizes(lo_sky.loadedObject, base._transform, -1); } bool is_field_stage = id.StartsWith("FI"); if (stageObject != null && is_field_stage && (!MonoBehaviourSingleton <SceneSettingsManager> .IsValid() || !MonoBehaviourSingleton <SceneSettingsManager> .I.forceFogON)) { ChangeLightShader(base._transform); } cameraLinkEffect = EffectManager.GetCameraLinkEffect(data.cameraLinkEffect, false, base._transform); cameraLinkEffectY0 = EffectManager.GetCameraLinkEffect(data.cameraLinkEffectY0, true, base._transform); rootEffect = EffectManager.GetEffect(data.rootEffect, base._transform); if (MonoBehaviourSingleton <SceneSettingsManager> .IsValid()) { MonoBehaviourSingleton <SceneSettingsManager> .I.attributeID = data.attributeID; SceneParameter sp = MonoBehaviourSingleton <SceneSettingsManager> .I.GetComponent <SceneParameter>(); if (sp != null) { sp.Apply(); } if (is_field_stage && !MonoBehaviourSingleton <SceneSettingsManager> .I.forceFogON) { ShaderGlobal.fogColor = (MonoBehaviourSingleton <SceneSettingsManager> .I.fogColor = new Color(0f, 0f, 0f, 0f)); ShaderGlobal.fogNear = (MonoBehaviourSingleton <SceneSettingsManager> .I.linearFogStart = 0f); ShaderGlobal.fogFar = (MonoBehaviourSingleton <SceneSettingsManager> .I.linearFogEnd = 3.40282347E+38f); ShaderGlobal.fogNearLimit = (MonoBehaviourSingleton <SceneSettingsManager> .I.limitFogStart = 0f); ShaderGlobal.fogFarLimit = (MonoBehaviourSingleton <SceneSettingsManager> .I.limitFogEnd = 1f); } if (MonoBehaviourSingleton <SceneSettingsManager> .I.saveInsideCollider && MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData != null && (MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData.minX != 0 || MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData.maxX != 0 || MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData.minZ != 0 || MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData.maxZ != 0)) { isValidInside = true; } if (isValidInside) { insideColliderData = MonoBehaviourSingleton <SceneSettingsManager> .I.insideColliderData; } } } else if (MonoBehaviourSingleton <SceneSettingsManager> .IsValid()) { ShaderGlobal.lightProbe = true; } ShaderGlobal.lightProbe = (LightmapSettings.get_lightProbes() != null); currentStageData = data; if (MonoBehaviourSingleton <SceneSettingsManager> .IsValid()) { WeatherController weatherController = MonoBehaviourSingleton <SceneSettingsManager> .I.weatherController; if (cameraLinkEffect != null) { cameraLinkEffect.get_gameObject().SetActive(!weatherController.cameraLinkEffectEnable); } if (cameraLinkEffectY0 != null) { cameraLinkEffectY0.get_gameObject().SetActive(!weatherController.cameraLinkEffectY0Enable); } } isLoadingStage = false; }
private IEnumerator InitImpl(string cutSceneDataPath, Action <bool> _onComplete) { LoadingQueue loadQueue = new LoadingQueue(this); if (!string.IsNullOrEmpty(cutSceneDataPath)) { LoadObject loadedCutSceneObj = loadQueue.Load(RESOURCE_CATEGORY.CUTSCENE, cutSceneDataPath, false); if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } cutSceneData = (loadedCutSceneObj.loadedObject as CutSceneData); } if (cutSceneData == null) { _onComplete?.Invoke(false); } else { for (int n = 0; n < cutSceneData.seDataList.Count; n++) { loadQueue.CacheSE(cutSceneData.seDataList[n].seId, null); } for (int m = 0; m < cutSceneData.effectKeyData.Count; m++) { loadQueue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, cutSceneData.effectKeyData[m].effectId); } for (int k = 0; k < 2; k++) { if (cameras[k] == null) { CutSceneCamera cutSceneCamera = new CutSceneCamera(); GameObject cameraObj = new GameObject("cut_scene_camera_ " + k.ToString()); cutSceneCamera.camera = cameraObj.AddComponent <Camera>(); cutSceneCamera.transform = cameraObj.get_transform(); cutSceneCamera.transform.set_parent(_transform); cameraObj.SetActive(false); cameras[k] = cutSceneCamera; } } playerInfo = new PlayerInfo[4]; enemyInfo = new EnemyInfo(); actorInfo = new ActorInfo[cutSceneData.actorData.Length]; effectInfo = new EffectInfo[cutSceneData.effectKeyData.Count]; seInfo = new SeInfo[cutSceneData.seDataList.Count]; for (int l = 0; l < cutSceneData.actorData.Length; l++) { CutSceneData.ActorData actorData = cutSceneData.actorData[l]; actorInfo[l] = new ActorInfo(); actorInfo[l].keyData = actorData; actorInfo[l].obj = Object.Instantiate <GameObject>(actorData.prefab); actorInfo[l].obj.get_transform().set_parent(_transform); actorInfo[l].animator = actorInfo[l].obj.GetComponent <Animator>(); actorInfo[l].animator.set_cullingMode(0); actorInfo[l].animator.set_runtimeAnimatorController(actorData.animatorController); actorInfo[l].animator.Rebind(); actorInfo[l].obj.SetActive(false); } for (int j = 0; j < cutSceneData.effectKeyData.Count; j++) { EffectInfo effect = new EffectInfo { keyData = cutSceneData.effectKeyData[j] }; effectInfo[j] = effect; } for (int i = 0; i < cutSceneData.seDataList.Count; i++) { SeInfo se = new SeInfo { keyData = cutSceneData.seDataList[i] }; seInfo[i] = se; } if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } _onComplete?.Invoke(true); } }
private IEnumerator DoGachaDeco() { LoadingQueue load_queue = new LoadingQueue(this); GachaDeco visible_info = null; while (true) { if (visible_info == gachaDecoInfo) { yield return((object)null); } else { if (visible_info != null) { bool wait2 = true; PlayTween((Enum)UI.OBJ_GACHA_DECO_ROOT, false, (EventDelegate.Callback) delegate { ((_003CDoGachaDeco_003Ec__Iterator2C) /*Error near IL_009a: stateMachine*/)._003Cwait_003E__2 = false; }, false, 0); while (wait2) { yield return((object)null); } SetActive((Enum)UI.OBJ_GACHA_DECO_ROOT, false); } if (gachaDecoInfo == null) { break; } visible_info = gachaDecoInfo; int icon_type = visible_info.appendixType; int icon_type_count = 0; string icon_effect_name = null; if (MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.gachaDecoIconEffectNames != null) { icon_type_count = MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.gachaDecoIconEffectNames.Length; icon_effect_name = ((icon_type >= icon_type_count) ? null : MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.gachaDecoIconEffectNames[icon_type]); } if (icon_type_count <= 0) { if (icon_type > 0) { icon_type = 1; } icon_type_count = 2; icon_effect_name = MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.gachaDecoNewEffectName; } LoadObject lo_tex = load_queue.Load(RESOURCE_CATEGORY.HOME_GACHA_DECO_IMAGE, ResourceName.GetGachaDecoImage(visible_info.decoId), false); if (!string.IsNullOrEmpty(icon_effect_name)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, icon_effect_name); } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } Texture2D tex = lo_tex.loadedObject as Texture2D; if (tex != null) { SetActive((Enum)UI.OBJ_GACHA_DECO_ROOT, true); for (int i = 0; i < icon_type_count; i++) { Transform t = GetGachaDecoIcon(i); if (t != null) { t.get_gameObject().SetActive(icon_type == i); } } SetTexture((Enum)UI.TEX_GACHA_DECO_IMAGE, tex); SetWidth((Enum)UI.TEX_GACHA_DECO_IMAGE, tex.get_width()); SetHeight((Enum)UI.TEX_GACHA_DECO_IMAGE, tex.get_height()); bool wait2 = true; PlayTween((Enum)UI.OBJ_GACHA_DECO_ROOT, true, (EventDelegate.Callback) delegate { ((_003CDoGachaDeco_003Ec__Iterator2C) /*Error near IL_034d: stateMachine*/)._003Cwait_003E__2 = false; }, false, 0); while (wait2) { yield return((object)null); } if (!string.IsNullOrEmpty(icon_effect_name) && icon_type > 0) { SetVisibleWidgetEffect(null, GetGachaDecoIcon(icon_type), icon_effect_name); } } } } }
private IEnumerator DoLoad(int body_id, int anim_id, float scale, string base_effect, string base_effect_node, bool need_shadow, bool enable_light_probes, bool need_anim_event_res_cache, SHADER_TYPE shader_type, int layer, string foundation_name, bool need_stamp_effect, bool will_stock, OnCompleteLoad callback) { Enemy enemy = this.get_gameObject().GetComponent <Enemy>(); if (enemy != null) { int id = enemy.id; } bodyID = body_id; bodyScale = scale; bool is_boss = false; if (enemy != null) { is_boss = enemy.isBoss; if (enemy.controller != null) { enemy.controller.set_enabled(false); } if (enemy.packetReceiver != null) { enemy.packetReceiver.SetStopPacketUpdate(true); } enemy.OnLoadStart(); } string body_name = ResourceName.GetEnemyBody(body_id); string mate_name = ResourceName.GetEnemyMaterial(body_id); string anim_name = ResourceName.GetEnemyAnim(anim_id); Transform _this = this.get_transform(); isLoading = true; LoadingQueue load_queue = new LoadingQueue(this); LoadObject lo_body = load_queue.LoadAndInstantiate(RESOURCE_CATEGORY.ENEMY_MODEL, body_name); LoadObject lo_mate = (mate_name == null) ? null : load_queue.Load(RESOURCE_CATEGORY.ENEMY_MATERIAL, body_name, new string[1] { mate_name }, false); LoadObject lo_anim = load_queue.Load(RESOURCE_CATEGORY.ENEMY_ANIM, anim_name, new string[2] { anim_name + "Ctrl", anim_name + "Event" }, false); if (!string.IsNullOrEmpty(base_effect)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, base_effect); } LoadObject lo_foundation = null; if (!string.IsNullOrEmpty(foundation_name)) { if (!MonoBehaviourSingleton <GlobalSettingsManager> .I.uiModelRendering.enableEnemyModelFoundationFromQuestStage) { foundation_name = "FST011"; } lo_foundation = load_queue.LoadAndInstantiate(RESOURCE_CATEGORY.FOUNDATION_MODEL, foundation_name); } yield return((object)load_queue.Wait()); body = lo_body.Realizes(_this, (layer != -1) ? layer : 11); if (layer == -1) { this.get_gameObject().set_layer(10); } body.set_localPosition(Vector3.get_zero()); body.set_localRotation(Quaternion.get_identity()); renderersBody = body.get_gameObject().GetComponentsInChildren <Renderer>(); if (lo_mate != null && lo_mate.loadedObject != null && renderersBody.Length == 1) { Material mate = lo_mate.loadedObject as Material; if (mate != null) { renderersBody[0].set_sharedMaterial(mate); } } if (enemy != null) { enemy.body = body; } body.set_localScale(Vector3.Scale(body.get_localScale(), new Vector3(scale, scale, scale))); animator = body.get_gameObject().GetComponent <Animator>(); if (animator != null && lo_anim.loadedObjects != null) { animator.set_runtimeAnimatorController(lo_anim.loadedObjects[0].obj); if (lo_anim.loadedObjects.Length >= 2 && lo_anim.loadedObjects[1] != null) { this.animEventData = (lo_anim.loadedObjects[1].obj as AnimEventData); } if (enemy != null) { body.get_gameObject().AddComponent <StageObjectProxy>().stageObject = enemy; enemy.animEventData = this.animEventData; } } if (!string.IsNullOrEmpty(base_effect)) { string node_name = base_effect_node; if (string.IsNullOrEmpty(node_name)) { node_name = "Root"; } Transform node = Utility.Find(body, node_name); Transform effect_transform = EffectManager.GetEffect(base_effect, node); if (effect_transform != null) { baseEffect = effect_transform; if (layer != -1) { Utility.SetLayerWithChildren(effect_transform, layer); } } } if (shader_type == SHADER_TYPE.LIGHTWEIGHT) { ShaderGlobal.ChangeWantLightweightShader(renderersBody); } if (is_boss) { materialParamsList = new List <MaterialParams>(); Shader.PropertyToID("_RimPower"); Shader.PropertyToID("_RimWidth"); Shader.PropertyToID("_Vanish_flag"); Shader.PropertyToID("_Vanish_rate"); Utility.MaterialForEach(renderersBody, delegate(Material material) { if (material != null) { MaterialParams materialParams = new MaterialParams { material = material }; if (materialParams.hasRimPower = material.HasProperty(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_RIM_POWER_003E__16)) { materialParams.defaultRimPower = material.GetFloat(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_RIM_POWER_003E__16); } if (materialParams.hasRimWidth = material.HasProperty(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_RIM_WIDTH_003E__17)) { materialParams.defaultRimWidth = material.GetFloat(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_RIM_WIDTH_003E__17); } materialParams.hasVanishFlag = material.HasProperty(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_VANISH_FLAG_003E__18); materialParams.hasVanishRate = material.HasProperty(((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003CID_VANISH_RATE_003E__19); ((_003CDoLoad_003Ec__Iterator228) /*Error near IL_062d: stateMachine*/)._003C_003Ef__this.materialParamsList.Add(materialParams); } }); } int l = 0; for (int k = renderersBody.Length; l < k; l++) { renderersBody[l].set_useLightProbes(enable_light_probes); } EnemyParam param = body.get_gameObject().GetComponent <EnemyParam>(); body.get_gameObject().SetActive(false); if (need_anim_event_res_cache && animator != null && lo_anim.loadedObjects != null && lo_anim.loadedObjects[1] != null) { AnimEventData tmpAnimEventData = lo_anim.loadedObjects[1].obj as AnimEventData; if (tmpAnimEventData != null) { if (enemy == null) { load_queue.CacheAnimDataUseResource(tmpAnimEventData, null, null); } else { LoadingQueue loadingQueue = load_queue; AnimEventData animEventData = tmpAnimEventData; Enemy enemy2 = enemy; loadingQueue.CacheAnimDataUseResource(animEventData, ((Character)enemy2).EffectNameAnalyzer, enemy.continusAtkEventDataList); } PreSetAnimationEventDataParamToEnemy(tmpAnimEventData, enemy); } } AnimEventData.ResidentEffectData[] residentEffectList = null; if (this.animEventData != null) { residentEffectList = this.animEventData.residentEffectDataList; if (residentEffectList != null) { int numEffect3 = residentEffectList.Length; for (int ef3 = 0; ef3 < numEffect3; ef3++) { if (!string.IsNullOrEmpty(residentEffectList[ef3].effectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, residentEffectList[ef3].effectName); } } } } if (param != null) { if (enemy != null || need_stamp_effect) { StageObject.StampInfo[] stampInfos = param.stampInfos; foreach (StageObject.StampInfo info4 in stampInfos) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, info4.effectName); } } if (param.isHide) { FieldMapTable.GatherPointViewTableData viewData = Singleton <FieldMapTable> .I.GetGatherPointViewData(param.gatherPointViewId); if (viewData != null) { if (!string.IsNullOrEmpty(viewData.targetEffectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, viewData.targetEffectName); } if (!string.IsNullOrEmpty(viewData.gatherEffectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, viewData.gatherEffectName); } } } SystemEffectSetting sysEffectSetting2 = param.residentEffectSetting; if (sysEffectSetting2 != null) { SystemEffectSetting.Data[] effectDataList = sysEffectSetting2.effectDataList; if (effectDataList != null) { int numEffect2 = effectDataList.Length; for (int ef2 = 0; ef2 < numEffect2; ef2++) { if (!string.IsNullOrEmpty(effectDataList[ef2].effectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, effectDataList[ef2].effectName); } } } } } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } if (enemy != null) { if (param != null) { EnemyTable.EnemyData data = enemy.enemyTableData; AttackHitInfo[] attackHitInfos = param.attackHitInfos; foreach (AttackHitInfo temp_info in attackHitInfos) { AttackHitInfo info = temp_info; if (!string.IsNullOrEmpty(data.convertRegionKey)) { string convert_name = info.name + "_" + data.convertRegionKey; AttackHitInfo[] convertAttackHitInfos = param.convertAttackHitInfos; foreach (AttackHitInfo convert_info in convertAttackHitInfos) { if (convert_info.name == convert_name) { info = convert_info; break; } } } if (info.hitSEID != 0) { load_queue.CacheSE(info.hitSEID, null); } load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, info.hitEffectName); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, info.remainEffectName); load_queue.CacheBulletDataUseResource(info.bulletData, null); RestraintInfo restInfo = temp_info.restraintInfo; if (restInfo.enable && !string.IsNullOrEmpty(restInfo.effectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, restInfo.effectName); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_target_flick"); if (temp_info.toPlayer.reactionType != 0) { Log.Error(LOG.INGAME, "Can't use reactionType with RestraintInfo!! " + temp_info.name); } } GrabInfo grabInfo = temp_info.grabInfo; if (grabInfo != null && grabInfo.enable && temp_info.toPlayer.reactionType != 0) { Log.Error(LOG.INGAME, "Can't use reactionType with GrabInfo!! " + temp_info.name); } InkSplashInfo inkSplashInfo = temp_info.inkSplashInfo; if (inkSplashInfo != null && inkSplashInfo.duration > 0f) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_pl_blind_01"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_pl_blind_02"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_target_flick"); } } AttackContinuationInfo[] attackContinuationInfos = param.attackContinuationInfos; foreach (AttackContinuationInfo temp_info2 in attackContinuationInfos) { AttackContinuationInfo info2 = temp_info2; if (!string.IsNullOrEmpty(data.convertRegionKey)) { string convert_name2 = info2.name + "_" + data.convertRegionKey; AttackContinuationInfo[] convertAttackContinuationInfos = param.convertAttackContinuationInfos; foreach (AttackContinuationInfo convert_info2 in convertAttackContinuationInfos) { if (convert_info2.name == convert_name2) { info2 = convert_info2; break; } } } load_queue.CacheBulletDataUseResource(info2.bulletData, null); } Enemy.RegionInfo[] regionInfos = param.regionInfos; foreach (Enemy.RegionInfo temp_info3 in regionInfos) { Enemy.RegionInfo info3 = temp_info3; if (!string.IsNullOrEmpty(data.convertRegionKey)) { string convert_name3 = info3.name + "_" + data.convertRegionKey; Enemy.RegionInfo[] convertRegionInfos = param.convertRegionInfos; foreach (Enemy.RegionInfo convert_info3 in convertRegionInfos) { if (convert_info3.name == convert_name3) { info3 = convert_info3; break; } } } load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, info3.breakEffect.effectName); } if (Singleton <EnemyHitMaterialTable> .IsValid()) { int j = 0; for (int len2 = param.regionInfos.Length; j < len2 + 1; j++) { string hit_material_name = (j >= len2) ? param.baseHitMaterialName : param.regionInfos[j].hitMaterialName; if (!string.IsNullOrEmpty(hit_material_name)) { EnemyHitMaterialTable.MaterialData check_data = Singleton <EnemyHitMaterialTable> .I.GetData(hit_material_name); if (check_data != null) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, check_data.addEffectName); int[] typeSEIDs = check_data.typeSEIDs; foreach (int type_se_id in typeSEIDs) { if (type_se_id != 0) { load_queue.CacheSE(type_se_id, null); } } } } } } } if (MonoBehaviourSingleton <InGameSettingsManager> .IsValid()) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.enemyParalyzeHitEffectName); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.enemyPoisonHitEffectName); } load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_enm_shock_01"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_enm_fire_01"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_pl_movedown_01"); EffectPlayProcessor processor = body.get_gameObject().GetComponent <EffectPlayProcessor>(); if (processor != null && processor.effectSettings != null) { enemy.effectPlayProcessor = processor; int i = 0; for (int len = processor.effectSettings.Length; i < len; i++) { if (!string.IsNullOrEmpty(processor.effectSettings[i].effectName)) { load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, processor.effectSettings[i].effectName); } } } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } } body.get_gameObject().SetActive(true); if (residentEffectList != null) { int numEffect = residentEffectList.Length; for (int ef = 0; ef < numEffect; ef++) { AnimEventData.ResidentEffectData effectData = residentEffectList[ef]; if (!string.IsNullOrEmpty(effectData.effectName) && !string.IsNullOrEmpty(effectData.linkNodeName)) { Transform parentTrans = Utility.Find(body.get_transform(), effectData.linkNodeName); if (parentTrans == null) { parentTrans = body.get_transform(); } Transform effectTrans = EffectManager.GetEffect(effectData.effectName, parentTrans); if (effectTrans != null) { if (layer != -1) { Utility.SetLayerWithChildren(effectTrans, layer); } Vector3 basisScale = effectTrans.get_localScale(); effectTrans.set_localScale(basisScale * effectData.scale); effectTrans.set_localPosition(effectData.offsetPos); effectTrans.set_localRotation(Quaternion.Euler(effectData.offsetRot)); ResidentEffectObject residentEffect = effectTrans.get_gameObject().AddComponent <ResidentEffectObject>(); residentEffect.Initialize(effectData); if (enemy != null) { enemy.RegisterResidentEffect(residentEffect); } } } } } if (param != null) { SystemEffectSetting sysEffectSetting = param.residentEffectSetting; SysEffectCreate(enemy, layer, sysEffectSetting); } if (need_shadow && param != null && param.shadowSize > 0f) { shadow = MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.CreateShadow(param.shadowSize, param.bodyRadius, bodyScale, true, _this, shader_type == SHADER_TYPE.LIGHTWEIGHT); } if (enemy != null) { if (param != null) { param.SetParam(enemy); Object.DestroyImmediate(param); } if (enemy.controller != null) { enemy.controller.set_enabled(true); } enemy.willStock = will_stock; enemy.OnLoadComplete(); if (enemy.packetReceiver != null) { enemy.packetReceiver.SetStopPacketUpdate(false); } } callback?.Invoke(enemy); if (lo_foundation != null) { foundation = lo_foundation.Realizes(_this, layer); foundation.SetParent(_this.get_parent(), true); } isLoading = false; }
protected virtual IEnumerator DoInitialize() { LoadingQueue load_queue = new LoadingQueue(this); if (!isInGameScene) { bool is_recv_delivery = false; load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_new"); load_queue.CacheEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_questselect_complete"); MonoBehaviourSingleton <QuestManager> .I.SendGetDeliveryList(delegate { ((_003CDoInitialize_003Ec__IteratorB2) /*Error near IL_007a: stateMachine*/)._003Cis_recv_delivery_003E__1 = true; }); while (!is_recv_delivery) { yield return((object)null); } sortSettings = SortSettings.CreateMemSortSettings(SortBase.DIALOG_TYPE.QUEST, SortSettings.SETTINGS_TYPE.ORDER_QUEST); InitQuestInfoData(); if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } } GetDeliveryList(); string tab = GameSection.GetEventData() as string; switch (tab) { case "DAILY": selectedTab = UI.BTN_TAB_DAILY; break; case "WEEKLY": selectedTab = UI.BTN_TAB_WEEKLY; break; case "NORMAL": selectedTab = UI.BTN_TAB_NORMAL; break; default: selectedTab = SelectTabByPriority(); break; } openRegionIds = MonoBehaviourSingleton <WorldMapManager> .I.GetOpenRegionIdListInWorldMap(REGION_DIFFICULTY_TYPE.NORMAL); Array.Reverse(openRegionIds); for (int i = 0; i < openRegionIds.Length; i++) { int regionId = (int)openRegionIds[i]; string bannerName = ResourceName.GetAreaBanner(regionId); LoadObject bannerObj = load_queue.Load(RESOURCE_CATEGORY.AREA_BANNER, bannerName, false); if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } Texture2D bannerTex = bannerObj.loadedObject as Texture2D; areaBanners.Add(bannerTex); } EndInitialize(); }