private void SetBottomBtnLable(QuestTraceInfo taskInfo) { TaskProcess process = taskInfo.GetTaskProcess(); if (process == TaskProcess.TaskProcess_None) { m_label_btn_bottom_Label.text = "接取"; } else if (process == TaskProcess.TaskProcess_Doing) { m_label_btn_bottom_Label.text = "放弃"; } else if (process == TaskProcess.TaskProcess_CanDone) { //开启自动完成 if (taskInfo.QuestTable.dwAutoCanDone) { TimerAxis.Instance().KillTimer(MISSIONCANDONE_TIMER, this); TimerAxis.Instance().SetTimer(MISSIONCANDONE_TIMER, 1000, this); missionCanDoneBtnCd = CONST_MissionCanDoneBtnCd; string btnDes = string.Format("完成({0})", missionCanDoneBtnCd); m_label_btn_bottom_Label.text = btnDes; } else { if (TimerAxis.Instance().IsExist(MISSIONCANDONE_TIMER, this)) { TimerAxis.Instance().KillTimer(MISSIONCANDONE_TIMER, this); } m_label_btn_bottom_Label.text = "完成"; } UIParticleWidget p = m_btn_btn_bottom.GetComponent <UIParticleWidget>(); if (p == null) { p = m_btn_btn_bottom.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (p != null) { p.SetDimensions(260, 54); p.ReleaseParticle(); p.AddRoundParticle(); } } }
/// <summary> /// 五行阵环绕特效 /// </summary> public void PlayCopyTargetEffect() { if (m_trans_copyTargetEffectRoot != null) { UIParticleWidget p = m_trans_copyTargetEffectRoot.GetComponent <UIParticleWidget>(); if (p == null) { p = m_trans_copyTargetEffectRoot.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (p != null) { p.SetDimensions(260, 225); p.ReleaseParticle(); p.AddRoundParticle(); } } }
public void RefreshSigne() { if (m_goSelect != null) { m_goSelect.SetActive(true); UIParticleWidget p = m_goSelect.GetComponent <UIParticleWidget>(); if (p == null) { p = m_goSelect.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (p != null) { p.SetDimensions(150, 50); p.ReleaseParticle(); p.AddRoundParticle(); } } }
void OnPlayBtnTeXiao(GameObject go, uint resourceID = 50009) { Transform root = go.transform.Find("Particle"); if (root != null) { UIParticleWidget p = root.GetComponent <UIParticleWidget>(); if (p == null) { p = root.gameObject.AddComponent <UIParticleWidget>(); p.depth = 100; } if (p != null) { p.SetDimensions(1, 1); p.ReleaseParticle(); p.AddRoundParticle(resourceID); } } }
/// <summary> /// 已经领奖励 hadGotReward /// </summary> /// <param name="hadGotReward"></param> void RefreshBtnStatus() { //完成首充了 bool afterFirstRechage = DataManager.Manager <Mall_HuangLingManager>().AlreadyFirstRecharge.Count > 0; bool hadGotReward = DataManager.Manager <ActivityManager>().HadGotFirstRechargeReward; m_btn_btn_recharge.gameObject.SetActive(!afterFirstRechage); m_btn_btn_getReward.gameObject.SetActive(afterFirstRechage); if (afterFirstRechage) { UIParticleWidget p = m_btn_btn_getReward.GetComponent <UIParticleWidget>(); if (p == null) { p = m_btn_btn_getReward.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (hadGotReward) { if (p != null) { p.ReleaseParticle(); } } else { //播放特效 if (p != null) { p.SetDimensions(180, 54); p.ReleaseParticle(); p.AddRoundParticle(); } } } }
public void RefreshSigne() { if (m_goCheck != null) { bool addparticle = m_WelfareData.state == QuickLevState.QuickLevState_CanGet; m_goCheck.SetActive(m_WelfareData.state == QuickLevState.QuickLevState_HaveGet); m_goSelect.SetActive(addparticle); UIParticleWidget p = m_goSelect.GetComponent <UIParticleWidget>(); if (p == null) { p = m_goSelect.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (p != null) { p.SetDimensions(144, 120); p.ReleaseParticle(); if (addparticle) { p.AddRoundParticle(); } } } }
void ShowUI() { if (m_Trailerdata == null) { return; } itemDic.Clear(); m_label_title.text = m_Trailerdata.strTitle; m_label_desc.text = m_Trailerdata.strDesc; m_sprite_icon.spriteName = m_Trailerdata.strIcon; m_sprite_icon.MakePixelPerfect(); FunctionPushManager manager = DataManager.Manager <FunctionPushManager>(); UIParticleWidget p = m_spriteEx_btnget.GetComponent <UIParticleWidget>(); if (p == null) { p = m_spriteEx_btnget.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (manager.CanOpen(m_Trailerdata)) { m_label_conditiondesc.text = m_Trailerdata.strCondidtionDesc; m_label_conditiondesc.color = new Color(9 / 255.0f, 127 / 255.0f, 29 / 255.0f); m_label_btnLabel.text = "领取奖励"; m_spriteEx_btnget.ChangeSprite(2); if (p != null) { p.SetDimensions(200, 54); p.ReleaseParticle(); p.AddRoundParticle(); } } else { if (p != null) { p.ReleaseParticle(); } m_label_btnLabel.text = "前往升级"; m_spriteEx_btnget.ChangeSprite(1); string[] strcondition = m_Trailerdata.strCondidtionDesc.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries); if (strcondition.Length == 2) { int level = MainPlayerHelper.GetPlayerLevel(); StringBuilder msg = new StringBuilder(); if (level < m_Trailerdata.level) { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("{0}(还差{1}级)\n", strcondition[0], (m_Trailerdata.level - level)))); } else { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Green, string.Format("{0}", strcondition[0]))); } if (DataManager.Manager <TaskDataManager>().CheckTaskFinished(m_Trailerdata.task)) { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Green, (string.Format("\n{0}", strcondition[1])))); } else { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("\n{0}", strcondition[1]))); } m_label_conditiondesc.text = msg.ToString(); } else { int level = MainPlayerHelper.GetPlayerLevel(); if (level < m_Trailerdata.level) { m_label_conditiondesc.text = ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("{0}(还差{1}级)", strcondition[0], (m_Trailerdata.level - level))); } else { m_label_conditiondesc.text = ColorManager.GetColorString(ColorType.JZRY_Green, string.Format("{0}", strcondition[0])); } } } int index = 0; UIManager uiMan = DataManager.Manager <UIManager>(); if (string.IsNullOrEmpty(m_Trailerdata.strJobItem) == false) { string[] strJobItem = m_Trailerdata.strJobItem.Split(';'); int job = MainPlayerHelper.GetMainPlayerJob(); if (strJobItem.Length >= job && job > 0) { string[] strItem = strJobItem[job - 1].Split('_'); if (strItem.Length == 2) { uint itemId = uint.Parse(strItem[0]); uint itemNum = uint.Parse(strItem[1]); if (!itemDic.ContainsKey(itemId)) { itemDic.Add(itemId, itemNum); } } } } else if (string.IsNullOrEmpty(m_Trailerdata.strItem) == false) { string[] strItem = m_Trailerdata.strItem.Split('_'); if (strItem.Length == 2) { uint itemId = uint.Parse(strItem[0]); uint itemNum = uint.Parse(strItem[1]); if (!itemDic.ContainsKey(itemId)) { itemDic.Add(itemId, itemNum); } } } else if (string.IsNullOrEmpty(m_Trailerdata.strMoney) == false) { string[] strItems = m_Trailerdata.strMoney.Split(';'); for (int i = 0; i < strItems.Length; i++) { string[] strItem = strItems[i].Split('_'); if (strItem.Length == 2) { uint itemId = uint.Parse(strItem[0]); uint itemNum = uint.Parse(strItem[1]); if (!itemDic.ContainsKey(itemId)) { CurrencyIconData data = CurrencyIconData.GetCurrencyIconByMoneyType((ClientMoneyType)itemId); if (data != null) { uint id = data.itemID; itemDic.Add(id, itemNum); } } } } } m_lst_UIItemRewardDatas.Clear(); var item = itemDic.GetEnumerator(); while (item.MoveNext()) { m_lst_UIItemRewardDatas.Add(new UIItemRewardData() { itemID = item.Current.Key, num = item.Current.Value, }); } m_ctor_UIItemRewardCreator.CreateGrids(m_lst_UIItemRewardDatas.Count); }
void ShowUI() { if (m_Trailerdata == null) { return; } m_lst_UIItemRewardDatas.Clear(); m_label_title.text = m_Trailerdata.strTitle; m_label_desc.text = m_Trailerdata.strDesc; if (string.IsNullOrEmpty(m_Trailerdata.strJobItem) == false) { string[] strJobItem = m_Trailerdata.strJobItem.Split(';'); int job = MainPlayerHelper.GetMainPlayerJob(); if (strJobItem.Length >= job && job > 0) { string[] strItem = strJobItem[job - 1].Split('_'); if (strItem.Length == 2) { uint itemId = uint.Parse(strItem[0]); uint itemNum = uint.Parse(strItem[1]); m_nItemID = itemId; m_lst_UIItemRewardDatas.Add(new UIItemRewardData() { itemID = itemId, num = itemNum, }); } } } else if (string.IsNullOrEmpty(m_Trailerdata.strItem) == false) { string[] strItem = m_Trailerdata.strItem.Split('_'); if (strItem.Length == 2) { uint itemId = uint.Parse(strItem[0]); uint itemNum = uint.Parse(strItem[1]); m_nItemID = itemId; m_lst_UIItemRewardDatas.Add(new UIItemRewardData() { itemID = itemId, num = itemNum, }); } } m_ctor_UIItemRewardCreator.CreateGrids(m_lst_UIItemRewardDatas.Count); FunctionPushManager manager = DataManager.Manager <FunctionPushManager>(); UIParticleWidget p = m_spriteEx_btnget.GetComponent <UIParticleWidget>(); if (p == null) { p = m_spriteEx_btnget.gameObject.AddComponent <UIParticleWidget>(); p.depth = 20; } if (manager.CanOpen(m_Trailerdata)) { m_label_conditionDesc.text = ColorManager.GetColorString(ColorType.JZRY_Green, (string.Format("{0}", m_Trailerdata.strCondidtionDesc))); m_label_btnLabel.text = "领取奖励"; m_spriteEx_btnget.ChangeSprite(2); if (p != null) { p.SetDimensions(200, 54); p.ReleaseParticle(); p.AddRoundParticle(); } } else { if (p != null) { p.ReleaseParticle(); } m_label_btnLabel.text = "前往升级"; m_spriteEx_btnget.ChangeSprite(1); string[] strcondition = m_Trailerdata.strCondidtionDesc.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries); if (strcondition.Length == 2) { int level = MainPlayerHelper.GetPlayerLevel(); StringBuilder msg = new StringBuilder(); if (level < m_Trailerdata.level) { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("{0}(还差{1}级)\n", strcondition[0], (m_Trailerdata.level - level)))); } else { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Green, string.Format("{0}", strcondition[0]))); } if (DataManager.Manager <TaskDataManager>().CheckTaskFinished(m_Trailerdata.task)) { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Green, (string.Format("\n{0}", strcondition[1])))); } else { msg.Append(ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("\n{0}", strcondition[1]))); } m_label_conditionDesc.text = msg.ToString(); } else { int level = MainPlayerHelper.GetPlayerLevel(); if (level < m_Trailerdata.level) { m_label_conditionDesc.text = ColorManager.GetColorString(ColorType.JZRY_Txt_Red, string.Format("{0}(还差{1}级)", strcondition[0], (m_Trailerdata.level - level))); } else { m_label_conditionDesc.text = ColorManager.GetColorString(ColorType.JZRY_Green, string.Format("{0}", strcondition[0])); } } } }