IEnumerator UnlockSiren() { yield return(new WaitForEndOfFrame()); if (m_LianHuaResult == null) { StartCoroutine(UnlockSiren()); } else { m_isLevelUp = m_LianHuaResult.Value.dwCurXiuWeiNum == 0; //更新界面 SirenItemControl_V3 sirenItemControl = m_SirenItemDict[m_LianHuaResult.Value.byYaoNvID]; sirenItemControl.UpdateView(m_LianHuaResult.Value.byLianHuaLevel); // m_SirenItemDict.TryGetValue(m_LianHuaResult.Value.byYaoNvID, out sirenItemControl); // if (sirenItemControl != null) // { // sirenItemControl.UpdateView(m_LianHuaResult.Value.byLianHuaLevel); // } //妖女表现 var sirenData = m_SirenItemDict[m_CurSelectedSirenItemID].GetSirenConfigData(); ViewControl_Siren.UpdateSiren(m_CurSelectedSirenItemID, sirenData); PlaySirenAnimation(null); // ViewControl_Siren.UpdateSiren(m_CurSelectedSirenItemID, sirenData); // ViewControl_Siren.PlayAnimation(sirenData._touchAnim); // ShowSirenDialog(sirenData._successWord); m_LianHuaResult = null; } }
//初始化女妖列表 private void InitSirenList() { var sirenList = SirenDataManager.Instance.GetPlayerSirenList(); sirenList.ApplyAllItem(p => { //* SirenItemControl_V3 区别于 SirenItemControl 其他版本,不继承于monobehaviour SirenItemControl_V3 itemCtrl = new SirenItemControl_V3(); itemCtrl.Init(p, SirenBeSelectedHandle); m_SirenItemDict.Add(p._sirenID, itemCtrl); }); //ItemPageManager_Siren.InitPager(sirenList.Count, 1, 0); // Button_PageUp.BackgroundSprite.alpha = m_curSirenNo <= 1 ? 0.5f : 1f; // Label_Pagination.text = "1/" + m_SirenItemDict.Count.ToString(); }
//初始化女妖列表 private void InitSirenList() { //var sirenList = PlayerDataManager.Instance.GetPlayerSirenList(); var sirenList = SirenDataManager.Instance.GetPlayerSirenList(); sirenList.ApplyAllItem(p => { //GameObject sirenItem = (GameObject)Instantiate(SirenItem.gameObject); //sirenItem.transform.parent = ItemPageManager_Siren.transform; //sirenItem.transform.localScale = Vector3.one; //SirenItemControl itemCtrl = sirenItem.GetComponent<SirenItemControl>(); SirenItemControl_V3 itemCtrl = new SirenItemControl_V3(); itemCtrl.Init(p, SirenBeSelectedHandle); m_SirenItemDict.Add(p._sirenID, itemCtrl); }); //ItemPageManager_Siren.InitPager(sirenList.Count, 1, 0); Button_PageUp.BackgroundSprite.alpha = m_curSirenNo <= 1 ? 0.5f : 1f; Label_Pagination.text = "1/" + m_SirenItemDict.Count.ToString(); }
IEnumerator RefineryUnderWay() { yield return(new WaitForEndOfFrame()); if (m_LianHuaResult != null) { Mark_Refinery.SetActive(false); if (m_LianHuaResult.Value.bySucess == 0) //炼化失败 { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_SirenFail"); //gEffRefineryResult = EffControl_Refinery.PlayEff(SirenRefineryEffectControl.Refinery.Fail); //妖女表现 PlaySirenAnimation(null); // var sirenData = m_SirenItemDict[m_CurSelectedSirenItemID].GetSirenConfigData(); // ViewControl_Siren.PlayAnimation(sirenData._touchAnim); // ShowSirenDialog(sirenData._failWord); } else //炼化成功 { m_isLevelUp = m_LianHuaResult.Value.dwCurXiuWeiNum == 0; //更新界面 SirenItemControl_V3 sirenItemControl = m_SirenItemDict[m_LianHuaResult.Value.byYaoNvID]; //List<SirenGrowthEffect> lastEffect = sirenItemControl.GetSirenGrowthEffect(); sirenItemControl.UpdateView(m_LianHuaResult.Value.byLianHuaLevel); //更新等级 和 界面 //完成进度条增长动画 var yaoNvData = SirenManager.Instance.GetYaoNvList().SingleOrDefault(p => p.byYaoNvID == m_CurSelectedSirenItemID); int curExp = yaoNvData.lExperience; int maxExp = m_SirenItemDict[m_CurSelectedSirenItemID].MaxExperience; StopAllCoroutines(); StartCoroutine(PlaySirenProcessIncreaseAnimation(m_CurSelectedSirenItemID, m_curSirenExperienceLastValue * 1f, curExp * 1f, maxExp)); //特效 if (sirenItemControl.IsMaxLevel()) { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_SirenComplete"); //gEffRefineryResult = EffControl_Refinery.PlayEff(SirenRefineryEffectControl.Refinery.Complete); //满级 置灰按钮 //Button_Refinery.SetEnabled(false); } else { SoundManager.Instance.PlaySoundEffect("Sound_UIEff_SirenSuccess"); //gEffRefineryResult = EffControl_Refinery.PlayEff(SirenRefineryEffectControl.Refinery.Success); } //妖女表现 var sirenData = m_SirenItemDict[m_CurSelectedSirenItemID].GetSirenConfigData(); ViewControl_Siren.UpdateSiren(m_CurSelectedSirenItemID, sirenData); PlaySirenAnimation(null); //振动效果 ViewControl_Siren.ShakeCamera(); } m_LianHuaResult = null; } else { StartCoroutine(RefineryUnderWay()); } }