private void UpdateGachaDeco(GachaDeco info) { if (MonoBehaviourSingleton <UIManager> .IsValid() && MonoBehaviourSingleton <UIManager> .I.mainMenu != null) { MonoBehaviourSingleton <UIManager> .I.mainMenu.UpdateGachaDeco(info); } }
private IEnumerator Start() { double interval_time = (double)MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.gachaDecoIntervalTime; GachaDeco info = null; while (true) { yield return((object)null); if (list != MonoBehaviourSingleton <UserInfoManager> .I.gachaDecoList) { list = MonoBehaviourSingleton <UserInfoManager> .I.gachaDecoList; index = 0; } if (!IsVisible() || list == null || list.Count == 0) { if (info != null) { UpdateGachaDeco(null); info = null; } } else { if (list.Count <= index) { index = 0; } info = list[index]; double num = (double)info.remainTime; TimeSpan timeSpan = new TimeSpan(TimeManager.GetNow().Ticks - MonoBehaviourSingleton <UserInfoManager> .I.gachaDecoDateBase); double remain_time = num - timeSpan.TotalSeconds; double wait_time = interval_time; if (wait_time > remain_time) { wait_time = remain_time; } if (wait_time > 1.0) { UpdateGachaDeco(info); float timer = (float)wait_time; while (timer > 0f && IsVisible()) { timer -= Time.get_deltaTime(); yield return((object)null); } } if (wait_time != interval_time) { list.Remove(info); } else { index++; } } } }
public void UpdateGachaDeco(GachaDeco data) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) bool flag = gachaDecoInfo == null && data != null; gachaDecoInfo = data; if (flag) { this.StartCoroutine(DoGachaDeco()); } }
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); } } } } }