private IEnumerator DoInitialize() { LoadingQueue loadingQueue = new LoadingQueue(this); LoadObject lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "SmithEquipDirection", false); int wait2 = 0; wait2++; NPCTable.NPCData npcData4 = Singleton <NPCTable> .I.GetNPCData(4); GameObject npcRoot4 = new GameObject("NPC"); npcData4.LoadModel(npcRoot4, false, true, delegate { ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_0093: stateMachine*/)._003Cwait_003E__2--; }, false); GameObject npcRoot3 = null; if (this is SmithAbilityChangePerformance || this is SmithAbilityItemPerformance) { wait2++; NPCTable.NPCData npcData3 = Singleton <NPCTable> .I.GetNPCData(3); npcRoot3 = new GameObject("NPC003"); npcData3.LoadModel(npcRoot3, false, true, delegate { ((_003CDoInitialize_003Ec__Iterator133) /*Error near IL_011c: stateMachine*/)._003Cwait_003E__2--; }, false); } int[] seIds2 = (int[])Enum.GetValues(typeof(SmithEquipDirector.AUDIO)); int[] array = seIds2; foreach (int seId in array) { loadingQueue.CacheSE(seId, null); } seIds2 = (int[])Enum.GetValues(typeof(EquipResultBase.AUDIO)); int[] array2 = seIds2; foreach (int seId2 in array2) { loadingQueue.CacheSE(seId2, null); } yield return((object)loadingQueue.Wait()); while (wait2 > 0) { yield return((object)null); } Object directionObject = lo_direction.loadedObject; Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1); director = directionTransform.GetComponent <SmithEquipDirector>(); director.SetNPC004(npcRoot4); director.SetNPC003(npcRoot3); base.Initialize(); }
protected void CacheAudio(LoadingQueue lo_queue) { int[] array = (int[])Enum.GetValues(typeof(AUDIO)); int[] array2 = array; foreach (int se_id in array2) { lo_queue.CacheSE(se_id, null); } }
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; } }
protected void CacheEnemyAudio(EnemyTable.EnemyData enemyData, LoadingQueue lo_queue) { if (lo_queue != null) { OutGameSettingsManager.EnemyDisplayInfo enemyDisplayInfo = MonoBehaviourSingleton <OutGameSettingsManager> .I.SearchEnemyDisplayInfoForGacha(enemyData); if (enemyDisplayInfo != null) { if (enemyDisplayInfo.seIdGachaShort > 0) { lo_queue.CacheSE(enemyDisplayInfo.seIdGachaShort, null); } if (enemyDisplayInfo.seIdGachaLong > 0) { lo_queue.CacheSE(enemyDisplayInfo.seIdGachaLong, null); } } } }
private IEnumerator LoadSE() { LoadingQueue load_queue = new LoadingQueue(this); int[] ids = (int[])Enum.GetValues(typeof(AUDIO)); int[] array = ids; foreach (int id in array) { load_queue.CacheSE(id, null); } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } }
private IEnumerator LoadSE() { LoadingQueue loadQueue = new LoadingQueue(this); int[] seList = (int[])Enum.GetValues(typeof(SE)); int[] array = seList; foreach (int seId in array) { loadQueue.CacheSE(seId, null); } if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } }
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); } }
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 LoadScriptResources() { Transform camera_t = MonoBehaviourSingleton <AppMain> .I.mainCameraTransform; initCameraPos = camera_t.get_position(); cameraPosAnim.Set(initCameraPos); LoadingQueue load_queue = new LoadingQueue(this); for (int cmd_row = 0; cmd_row < scriptCommands.Count; cmd_row++) { string cmd = scriptCommands[cmd_row].cmd; string p4 = scriptCommands[cmd_row].p0; string p3 = scriptCommands[cmd_row].p1; string p2 = scriptCommands[cmd_row].p2; switch (cmd) { case "EFF_SHOW": { LoadObject load_obj = load_queue.LoadEffect(RESOURCE_CATEGORY.EFFECT_ACTION, p4, false); effectPrefabs.Add(p4, load_obj); if (effectRenderTex == null) { effectRenderTex = UIRenderTexture.Get(effectTex, -1f, true, 1); effectRenderTex.Enable(0.25f); } break; } case "SE_PLAY": try { int se_id = int.Parse(p4); load_queue.CacheSE(se_id, null); } catch { Log.Error(LOG.EXCEPTION, "{0}コマンドのSEIDに整数ではない値が指定されています。", cmd); } break; case "MSG": if (!string.IsNullOrEmpty(p2)) { try { int voice_id = int.Parse(p2); load_queue.CacheVoice(voice_id, null); } catch { Log.Error(LOG.EXCEPTION, "{0}コマンドのボイスIDに整数ではない値が指定されています。", cmd); } } break; case "CHR_LOAD": { int id = -1; for (int i = 0; (float)i < 4f; i++) { if (charas.Find((StoryCharacter o) => o.id == ((_003CLoadScriptResources_003Ec__IteratorC1) /*Error near IL_02d5: stateMachine*/)._003Ci_003E__11) == null) { id = i; break; } } if (id != -1) { UITexture ui_tex = eventReceiver.GetModelUITexture(id); if (ui_tex != null) { StoryCharacter chara = StoryCharacter.Initialize(id, ui_tex, p4, p3, p2); if (chara != null) { charas.Add(chara); } } } break; } } } while (MonoBehaviourSingleton <ResourceManager> .I.isLoading || InstantiateManager.isBusy) { yield return((object)null); } isLoading = false; }
private IEnumerator DoSkillGacha() { Transform _transform = this.get_transform(); Reset(); if (line != null) { line.set_enabled(true); } isReam = false; if (MonoBehaviourSingleton <GachaManager> .IsValid() && MonoBehaviourSingleton <GachaManager> .I.IsReam()) { isReam = true; } SetActivateBasketCollider(true); Vector3 basket_pos = basket.get_position(); for (int l = 0; l < 20; l++) { CreateBall(_transform, 0, basket_pos + Quaternion.AngleAxis((float)(l * 45), Vector3.get_right()) * new Vector3(0.04f * (float)(l - 10), 0.08f, 0f), false); } LoadingQueue load_queue = new LoadingQueue(this); if (isReam) { int k = 0; for (int j = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count; k < j; k++) { GachaResult.GachaReward rwd = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[k]; SkillItemTable.SkillItemData skill_item_data = Singleton <SkillItemTable> .I.GetSkillItemData((uint)rwd.itemId); if (skill_item_data != null) { load_queue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(skill_item_data.modelID), false); load_queue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemSymbolModel(skill_item_data.iconID), false); } } List <GachaResult.GachaReward> rewards = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward; if (ballsRen != null) { for (int i = 0; i < ballsRen.Length; i++) { if (i < rewards.Count) { GachaResult.GachaReward rwd2 = rewards[i]; SkillItemTable.SkillItemData skill_item_data2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)rwd2.itemId); if (skill_item_data2 != null) { MeshRenderer mr = ballsRen[i].GetComponent <MeshRenderer>(); int index = skill_item_data2.rarity.ToRarityExpressionID(); MeshRenderer rareBall = balls[index].GetComponent <MeshRenderer>(); mr.set_sharedMaterial(rareBall.get_sharedMaterial()); } } } } } int[] se_id_list = (int[])Enum.GetValues(typeof(AUDIO)); int[] array = se_id_list; foreach (int id in array) { load_queue.CacheSE(id, null); } LoadingQueue loadQueue = new LoadingQueue(this); for (int tx = 0; tx < 3; tx++) { LoadObject loadObj = loadQueue.Load(RESOURCE_CATEGORY.MAGI_BASKET_MODEL_TEX, ResourceName.GetMagiGachaModelTexutre(2 + tx), false); while (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } basketModelTextureList[tx] = loadObj.loadedObject; } if (backupBasketModelTexture != null) { Material mat = GetMaterial(basket); if (mat != null) { mat.set_mainTexture(backupBasketModelTexture); mat.SetColor("_SpeLightColor", backupBasketSpeColor); } } yield return((object)new WaitForSeconds(1f)); npcModel = Utility.CreateGameObject("NPC", this.get_transform().get_parent(), -1); managedObjects.Add(npcModel.get_gameObject()); NPCLoader npc_loader = npcModel.get_gameObject().AddComponent <NPCLoader>(); npc_loader.Load(Singleton <NPCTable> .I.GetNPCData(1).npcModelID, 0, false, true, SHADER_TYPE.NORMAL, null); while (npc_loader.isLoading) { yield return((object)null); } if (load_queue != null && load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } npcAnimator = npc_loader.animator; yield return((object)null); m_isFinishLoad = true; npcAnimator.set_cullingMode(0); npcAnimator.Rebind(); npcAnimator.set_cullingMode(0); gachaAnimator.Rebind(); cameraAnimator.set_cullingMode(0); cameraAnimator.Rebind(); string anim_name = (!IsSingleGacha) ? "SKILL_GACHA_REAM" : "SKILL_GACHA_SINGLE"; dropCount = 0; Drop(); Play(anim_name, null, 0f); if (isReam) { while (dropCount < 11) { if (skip && IsFinishDrop10()) { if (MonoBehaviourSingleton <TransitionManager> .I.isChanging) { yield return((object)null); } Time.set_timeScale(1f); skip = false; yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); } yield return((object)null); } } while (mainBall.get_gameObject().get_activeSelf()) { yield return((object)null); } if (skip) { yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); Time.set_timeScale(1f); } yield return((object)null); sectionCommandReceiver.OnEnd(); coroutine = null; }
private IEnumerator DoInitialize() { eventData = (SectionEventData)GameSection.GetEventData(); FieldMapTable.PortalTableData portal = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <FieldManager> .I.currentPortalID); FieldMapTable.FieldMapTableData mapA = Singleton <FieldMapTable> .I.GetFieldMapData(portal.srcMapID); FieldMapTable.FieldMapTableData mapB = Singleton <FieldMapTable> .I.GetFieldMapData(portal.dstMapID); fromRegionID = mapA.regionId; toRegionID = mapB.regionId; LoadingQueue loadQueue = new LoadingQueue(this); LoadObject loadedWorldMap = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "WorldMap", false); LoadObject loadedRegionSpotRoot = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "RegionSpotRoot", false); LoadObject loadedRegionSpot = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "RegionSpot", false); LoadObject loadedPlayerMarker = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "PlayerMarker", false); LoadObject loadedMapGlowEffectA = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "MapGlowEffectA", false); LoadObject loadedMapGlowEffectB = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "MapGlowEffectB", false); LoadObject loadedTelop = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "TelopOpenRegion", false); loadQueue.CacheSE(SE_ID_LOGO, null); loadQueue.CacheSE(SE_ID_SMOKE, null); uint[] openedRegionids = MonoBehaviourSingleton <WorldMapManager> .I.GetOpenRegionIdListInWorldMap(); if (openedRegionids.Length == 0) { openedRegionids = new uint[1]; } LoadObject[] regionAreaLOs = new LoadObject[openedRegionids.Length]; string newRegionIcon = ResourceName.GetRegionIcon(0); string passedRegionIcon = ResourceName.GetRegionIcon(1); int lastIndex = openedRegionids.Length - 1; openedRegionInfo = new OpendRegionInfo[openedRegionids.Length]; for (int j = 0; j < openedRegionids.Length; j++) { RegionTable.Data data = Singleton <RegionTable> .I.GetData(openedRegionids[j]); if (!data.hasParentRegion()) { string iconName = passedRegionIcon; if (lastIndex == j) { iconName = newRegionIcon; } LoadObject loadedObj = loadQueue.Load(RESOURCE_CATEGORY.REGION_ICON, iconName, false); openedRegionInfo[j] = new OpendRegionInfo(data, loadedObj); if (j != 0) { regionAreaLOs[j] = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "WorldMapPart" + openedRegionids[j].ToString("D3"), false); } } } LoadObject loadedMaterial = null; if (!eventData.IsOnlyCameraMoveEvent()) { loadedMaterial = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "WorldMapPartGlow" + toRegionID.ToString("D3"), false); } if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } worldMapUIRoot = ResourceUtility.Realizes(loadedWorldMap.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).get_gameObject(); worldMapCamera = worldMapUIRoot.get_transform().Find("Camera").GetComponent <WorldMapCameraController>(); worldMapCamera.isInteractive = false; worldMapObject = worldMapUIRoot.get_transform().FindChild("Map"); spots = new SpotManager(loadedRegionSpotRoot.loadedObject as GameObject, loadedRegionSpot.loadedObject as GameObject, worldMapCamera._camera); spots.CreateSpotRoot(); GameObject bg = spots.spotRootTransform.Find("BG").get_gameObject(); bg.get_gameObject().SetActive(true); bgEventListener = UIEventListener.Get(bg); spots.spotRootTransform.Find("TaptoSkip").get_gameObject().SetActive(true); mapGlowEffectA = ResourceUtility.Realizes(loadedMapGlowEffectA.loadedObject, worldMapObject, -1); mapGlowEffectA.get_gameObject().SetActive(false); mapGlowEffectParticleA = mapGlowEffectA.GetComponent <ParticleSystem>(); mapGlowEffectB = ResourceUtility.Realizes(loadedMapGlowEffectB.loadedObject, worldMapObject, -1); mapGlowEffectB.get_gameObject().SetActive(false); mapGlowEffectParticleB = mapGlowEffectB.GetComponent <ParticleSystem>(); playerMarker = ResourceUtility.Realizes(loadedPlayerMarker.loadedObject, base._transform, -1); playerMarker.get_gameObject().SetActive(false); if (loadedMaterial != null) { glowMaterial = (loadedMaterial.loadedObject as Material); } regionAreas = (Transform[])new Transform[regionAreaLOs.Length]; for (int i = 0; i < regionAreaLOs.Length; i++) { LoadObject areaLO = regionAreaLOs[i]; if (areaLO != null && null != areaLO.loadedObject) { Transform regionArea = ResourceUtility.Realizes(areaLO.loadedObject, worldMapObject, -1); if (i == toRegionID) { if (eventData.IsOnlyCameraMoveEvent()) { regionArea.get_gameObject().SetActive(true); } else { regionArea.get_gameObject().SetActive(false); } mapGlowEffectA.SetParent(regionArea); mapGlowEffectA.set_localPosition(new Vector3(0f, 0f, 0f)); mapGlowEffectB.SetParent(regionArea); mapGlowEffectB.set_localPosition(new Vector3(0f, 0f, 0f)); ShapeModule module = mapGlowEffectParticleB.get_shape(); MeshFilter meshFilter = regionArea.GetComponent <MeshFilter>(); module.set_mesh(meshFilter.get_sharedMesh()); glowRegionTop = ResourceUtility.Realizes(areaLO.loadedObject, worldMapObject, -1); glowRegionTop.get_gameObject().SetActive(false); glowRegionTop.set_localPosition(glowRegionTop.get_localPosition() + new Vector3(0f, 0f, 0.001f)); glowRegionTop.set_localScale(new Vector3(1.1f, 1.1f, 1.1f)); glowRegionTop.GetComponent <Renderer>().set_material(glowMaterial); } else { regionArea.get_gameObject().SetActive(true); } regionAreas[i] = regionArea; } } telop = ResourceUtility.Realizes(loadedTelop.loadedObject, spots.spotRootTransform, -1); Transform closeBtn = Utility.Find(spots.spotRootTransform, "CLOSE_BTN"); if (null != closeBtn) { closeBtn.get_gameObject().SetActive(false); } if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "InGameScene") { MonoBehaviourSingleton <ScreenOrientationManager> .I.OnScreenRotate += InitMapSprite; } base.Initialize(); }
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; }
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 DoInitialzie() { LoadingQueue loadQueue = new LoadingQueue(this); LoadObject loadedCutSceneObj = loadQueue.Load(RESOURCE_CATEGORY.CUTSCENE, "Opening", false); LoadObject loadedTitleObj = loadQueue.Load(RESOURCE_CATEGORY.CUTSCENE, "Title", false); int[] se_ids = (int[])Enum.GetValues(typeof(AUDIO)); int[] array = se_ids; foreach (int id in array) { loadQueue.CacheSE(id, null); } int[] voices = (int[])Enum.GetValues(typeof(VOICE)); int[] array2 = voices; foreach (int id2 in array2) { loadQueue.CacheVoice(id2, null); } if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } if (MonoBehaviourSingleton <AppMain> .I.mainCamera != null) { MonoBehaviourSingleton <AppMain> .I.mainCamera.set_enabled(false); } cutSceneObjectRoot = (ResourceUtility.Instantiate <Object>(loadedCutSceneObj.loadedObject) as GameObject); cutSceneObjectRoot.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I.get_transform()); titleObjectRoot = (ResourceUtility.Instantiate <Object>(loadedTitleObj.loadedObject) as GameObject); titleObjectRoot.get_transform().set_parent(MonoBehaviourSingleton <AppMain> .I.get_transform()); Transform eventObj = cutSceneObjectRoot.get_transform().FindChild("CUT_op"); if (eventObj != null) { cutOP = eventObj.get_gameObject(); cutSceneAnimation = cutOP.GetComponent <Animation>(); cutOP.SetActive(false); } Transform fade = cutSceneObjectRoot.get_transform().FindChild("Main Camera/Plane"); if (fade != null) { MeshRenderer renderer = fade.GetComponent <MeshRenderer>(); whiteFadeMaterial = renderer.get_material(); } titleAnimation = titleObjectRoot.GetComponent <Animation>(); cutSceneAnimation.Stop(); MonoBehaviourSingleton <FieldManager> .I.SetCurrentFieldMapPortalID(10000100u); MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_start_screen, "Tutorial"); MonoBehaviourSingleton <UIManager> .I.loading.HideAllPermissionMsg(); base.Initialize(); PredownloadManager.openingMode = true; MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <PredownloadManager>(); MonoBehaviourSingleton <UIManager> .I.loading.downloadGaugeVisible = false; PredownloadManager.Stop(PredownloadManager.STOP_FLAG.INGAME_TUTORIAL, true); DataTableManager dataTableManager = MonoBehaviourSingleton <DataTableManager> .I; Protocol.Send <CheckRegisterModel>(CheckRegisterModel.URL, delegate { ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_0399: stateMachine*/)._003CupdatedTableIndex_003E__15 = true; }, string.Empty); yield return((object)new WaitUntil((Func <bool>)(() => ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03b0: stateMachine*/)._003CupdatedTableIndex_003E__15))); isDownloading = true; dataTableManager.InitializeForDownload(); dataTableManager.UpdateManifest(delegate { ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003CdataTableManager_003E__14.LoadInitialTable(delegate { List <DataLoadRequest> loadings = ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003CdataTableManager_003E__14.LoadAllTable(delegate { PredownloadManager.Stop(PredownloadManager.STOP_FLAG.INGAME_TUTORIAL, false); ((_003CDoInitialzie_003Ec__IteratorEC) /*Error near IL_03ef: stateMachine*/)._003C_003Ef__this.isDownloading = false; }, true); MonoBehaviourSingleton <UIManager> .I.loading.SetProgress(new FirstOpeningProgress(loadings)); }, true); }); TitleTop.isFirstBoot = false; }