private void SetPickUp() { if (lb.usePickUp != 0) { int i = arrayNow + 1; for (int count = lb.next.Count; i < count; i++) { if (lb.next[i].reward[0].isPickUp) { pickUpReward = lb.next[i].reward[0]; return; } } for (int num = arrayNow; num >= 0; num--) { if (lb.next[num].reward[0].isPickUp) { pickUpReward = lb.next[num].reward[0]; return; } } } if (lb.next.Count - 1 > arrayNow) { pickUpReward = lb.next[arrayNow + 1].reward[0]; } else { pickUpReward = lb.next[arrayNow].reward[0]; } }
public override void Initialize() { //IL_0272: Unknown result type (might be due to invalid IL or missing references) base.Initialize(); texModel_ = Utility.Find(base._transform, "TEX_MODEL"); texModelRenderTexture_ = UIModelRenderTexture.Get(texModel_); texModelTexture_ = texModel_.GetComponent <UITexture>(); texInnerModel_ = Utility.Find(base._transform, "TEX_INNER_MODEL"); texInnerModelRenderTexture_ = UIModelRenderTexture.Get(texInnerModel_); texInnerModelTexture_ = texInnerModel_.GetComponent <UITexture>(); glowModel_ = Utility.Find(base._transform, "LIB_00000003"); LoginBonus loginBonus = (LoginBonus)GameSection.GetEventData(); if (loginBonus != null) { SetLabelText((Enum)UI.LBL_LOGIN_DAYS, loginBonus.name); if (loginBonus.reward.Count > 0) { reward = loginBonus.reward[0]; SetLabelText((Enum)UI.LBL_GET_ITEM, reward.name); if (reward.type == 5) { uint itemId = (uint)reward.itemId; texModelRenderTexture_.InitSkillItem(texModelTexture_, itemId, true, false, 45f); texInnerModelRenderTexture_.InitSkillItemSymbol(texInnerModelTexture_, itemId, true, 17f); isModel = true; } else if (reward.type == 4) { SetRenderEquipModel((Enum)UI.TEX_MODEL, (uint)reward.itemId, -1, -1, reward.GetScale()); texModelTexture_.width = 300; texModelTexture_.height = 300; isModel = true; } else if (reward.type == 1 || reward.type == 2) { uint itemModelID = GetItemModelID((REWARD_TYPE)reward.type, reward.itemId); texModelRenderTexture_.InitItem(texModelTexture_, itemModelID, true); isModel = true; } else if (reward.type == 3 && IsDispItem3D(reward.itemId)) { uint itemModelID2 = GetItemModelID((REWARD_TYPE)reward.type, reward.itemId); texModelRenderTexture_.InitItem(texModelTexture_, itemModelID2, true); isModel = true; } if (!isModel) { this.StartCoroutine("LoadIcon"); } float rotateSpeed = 35f; texModelRenderTexture_.SetRotateSpeed(rotateSpeed); texInnerModelRenderTexture_.SetRotateSpeed(rotateSpeed); } } }
private IEnumerator LoadIcon() { yield return((object)null); LoginBonus.LoginBonusReward r = reward; ItemIcon icon = ItemIcon.CreateRewardItemIcon((REWARD_TYPE)r.type, (uint)r.itemId, GetCtrl(UI.OBJ_DETAIL_ROOT), -1, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT); icon.transform.set_localScale(new Vector3(1.5f, 1.5f, 1.5f)); GetCtrl(UI.OBJ_DETAIL_ROOT).set_localPosition(new Vector3(0f, 50f, 0f)); }
protected void OnQuery_ABILITY_DATA_POPUP() { //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) object[] array = GameSection.GetEventData() as object[]; int index = (int)array[0]; string text = string.Empty; string text2 = null; string empty = string.Empty; LoginBonus.LoginBonusReward loginBonusReward = lb.next[index].reward[0]; if (Singleton <ItemTable> .I.IsExistItemData((uint)loginBonusReward.itemId)) { ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)loginBonusReward.itemId); if (itemData != null) { text = itemData.name; text2 = itemData.text; } } if (string.IsNullOrEmpty(text)) { text = loginBonusReward.name; } empty = "x" + loginBonusReward.itemNum.ToString(); Vector3 localPosition = default(Vector3); localPosition._002Ector(0f, 60f, 0f); if (text2 != null) { SetLabelText(infoDetail, UI.LBL_INFODETAIL_NAME, text); SetLabelText(infoDetail, UI.LBL_INFODETAIL_DESC, text2); SetLabelText(infoDetail, UI.LBL_INFODETAIL_NUM, empty); infoDetail.set_localPosition(localPosition); infoDetail.get_gameObject().SetActive(true); isDetail = true; } else { SetLabelText(info, UI.LBL_INFO_NAME, text); SetLabelText(info, UI.LBL_INFO_NUM, empty); info.set_localPosition(localPosition); info.get_gameObject().SetActive(true); isDetail = false; } GameSection.StopEvent(); }
public override void Initialize() { base.Initialize(); MonoBehaviourSingleton <AccountManager> .I.DisplayLogInBonusSection(); texModel_ = Utility.Find(base._transform, "TEX_MODEL"); texModelRenderTexture_ = UIModelRenderTexture.Get(texModel_); texModelTexture_ = texModel_.GetComponent <UITexture>(); texInnerModel_ = Utility.Find(base._transform, "TEX_INNER_MODEL"); texInnerModelRenderTexture_ = UIModelRenderTexture.Get(texInnerModel_); texInnerModelTexture_ = texInnerModel_.GetComponent <UITexture>(); glowModel_ = Utility.Find(base._transform, "LIB_00000003"); LoginBonus loginBonus = MonoBehaviourSingleton <AccountManager> .I.logInBonus.Find((LoginBonus obj) => obj.type == 0); if (loginBonus != null) { MonoBehaviourSingleton <AccountManager> .I.logInBonus.Remove(loginBonus); SetLabelText((Enum)UI.LBL_LOGIN_DAYS, loginBonus.total.ToString()); if (loginBonus.reward.Count > 0) { LoginBonus.LoginBonusReward loginBonusReward = loginBonus.reward[0]; SetLabelText((Enum)UI.LBL_GET_ITEM, loginBonusReward.name); float rotateSpeed = 35f; if (loginBonusReward.type == 5) { uint itemId = (uint)loginBonusReward.itemId; texModelRenderTexture_.InitSkillItem(texModelTexture_, itemId, true, false, 45f); texInnerModelRenderTexture_.InitSkillItemSymbol(texInnerModelTexture_, itemId, true, 17f); } else { uint itemModelID = GetItemModelID((REWARD_TYPE)loginBonusReward.type, loginBonusReward.itemId); texModelRenderTexture_.InitItem(texModelTexture_, itemModelID, true); } texModelRenderTexture_.SetRotateSpeed(rotateSpeed); texInnerModelRenderTexture_.SetRotateSpeed(rotateSpeed); } } }
public override void UpdateUI() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) if (lb == null) { SetLabelText((Enum)UI.LBL_PICKUP, string.Empty); SetLabelText((Enum)UI.LBL_PERIOD, string.Empty); } else { if (topImageLoadObj != null) { Texture2D val = null; val = (topImageLoadObj.loadedObject as Texture2D); if (val != null) { Transform t2 = FindCtrl(base._transform, UI.TEX_LOGIN_BANNER); SetActive(t2, true); SetTexture(t2, val); } } if (!isModel) { FindCtrl(base._transform, UI.OBJ_DETAIL_ROOT).set_localPosition(new Vector3(pickUpPosX, pickUpItemPosY, 0f)); LoginBonus.LoginBonusReward loginBonusReward = pickUpReward; ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon((REWARD_TYPE)loginBonusReward.type, (uint)loginBonusReward.itemId, Utility.Find(base._transform, "OBJ_DETAIL_ROOT"), -1, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT); itemIcon.transform.set_localScale(new Vector3(1.5f, 1.5f, 1.5f)); } SetLabelText((Enum)UI.LBL_PERIOD, lb.period_announce); SetLabelText((Enum)UI.LBL_LOGIN_DAYS, string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 7u), lb.nowCount.ToString())); FindCtrl(base._transform, UI.LBL_PICKUP).GetComponent <UILabel>().supportEncoding = true; SetLabelText((Enum)UI.LBL_PICKUP, pickUpReward.pickUpText); int count = lb.next.Count; SetFrame(1 + (lb.next.Count - 1) / 5, lb.boardType); touchAndReleaseList.Clear(); SetGrid(UI.GRD_BONUSLIST, "LimitedLoginBonusItem", count, false, delegate(int i, Transform t, bool b) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) bool flag = false; LoginBonus.LoginBonusReward loginBonusReward2 = null; loginBonusReward2 = lb.next[i].reward[0]; flag = loginBonusReward2.isGet; if (arrayNow == i && lb.reward.Count > 0) { GameObject val2 = FindCtrl(t, UI.SPR_STAMP_ANIM).get_gameObject(); val2.SetActive(true); EventDelegate.Set(val2.GetComponentInChildren <TweenScale>().onFinished, SetGetDialog); FindCtrl(t, UI.SPR_STAMP).get_gameObject().SetActive(false); } else if (flag) { FindCtrl(t, UI.SPR_STAMP_ANIM).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_STAMP).get_gameObject().SetActive(true); } else { FindCtrl(t, UI.SPR_STAMP).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_STAMP_ANIM).get_gameObject().SetActive(false); } if (loginBonusReward2.isPickUp) { FindCtrl(t, UI.SPR_DAY_BASE).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_DAY_BASE_PICKUP).get_gameObject().SetActive(true); FindCtrl(t, UI.SPR_DAY_BASE_FINE).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY_PICKUP).get_gameObject().SetActive(true); FindCtrl(t, UI.LBL_DAY_FINE).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY).get_gameObject().SetActive(false); SetLabelText(t, UI.LBL_DAY_PICKUP, loginBonusReward2.day); } else if (loginBonusReward2.frameType != 0) { FindCtrl(t, UI.SPR_DAY_BASE).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_DAY_BASE_PICKUP).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_DAY_BASE_FINE).get_gameObject().SetActive(true); FindCtrl(t, UI.LBL_DAY_PICKUP).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY_FINE).get_gameObject().SetActive(true); FindCtrl(t, UI.LBL_DAY).get_gameObject().SetActive(false); SetLabelText(t, UI.LBL_DAY_FINE, loginBonusReward2.day); } else { FindCtrl(t, UI.SPR_DAY_BASE).get_gameObject().SetActive(true); FindCtrl(t, UI.SPR_DAY_BASE_PICKUP).get_gameObject().SetActive(false); FindCtrl(t, UI.SPR_DAY_BASE_FINE).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY_PICKUP).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY_FINE).get_gameObject().SetActive(false); FindCtrl(t, UI.LBL_DAY).get_gameObject().SetActive(true); SetLabelText(t, UI.LBL_DAY, loginBonusReward2.day); } SetLabelText(t, UI.LBL_ITEMNUM, "x" + loginBonusReward2.itemNum.ToString()); ItemIcon itemIcon2 = ItemIcon.CreateRewardItemIcon((REWARD_TYPE)loginBonusReward2.type, (uint)loginBonusReward2.itemId, FindCtrl(t, UI.OBJ_ICON_ROOT), -1, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT); if (itemIcon2 != null) { itemIcon2.SetEnableCollider(false); } if (flag) { UITexture[] componentsInChildren = itemIcon2.GetComponentsInChildren <UITexture>(); int j = 0; for (int num = componentsInChildren.Length; j < num; j++) { componentsInChildren[j].color = Color.get_gray(); } UISprite[] componentsInChildren2 = itemIcon2.GetComponentsInChildren <UISprite>(); int k = 0; for (int num2 = componentsInChildren2.Length; k < num2; k++) { componentsInChildren2[k].color = Color.get_gray(); } } SetAbilityItemEvent(t, i, touchAndReleaseList); }); if (isFirst) { Transform ctrl = GetCtrl(UI.SCR_BONUSLIST); UIPanel component = ctrl.GetComponent <UIPanel>(); ctrl.get_transform().set_localPosition(new Vector3(0f, startScrPos, 0f)); component.clipOffset = new Vector2(0f, 0f - startScrPos); } } }