Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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());
            }
        }