示例#1
0
 protected void UnRegist()
 {
     MsgHander.UnRegist(0xD591, S2C_GetCoupleInfo);
     MsgHander.UnRegist(0xD534, S2C_GetTokenUpLev);
     MsgHander.UnRegist(0xD759, S2C_GetInitimacyUpdata);
     //MsgHander.UnRegist(0xD688, S2C_GetCouple);
     MsgHander.UnRegist(0xD531, S2C_GetCoupleBrokeUp);
     MsgHander.UnRegist(0xD797, S2C_ShowFlower);
     titleRef     = null;
     nextTitleRef = null;
     coupleData   = null;
     isMarrige    = false;
 }
示例#2
0
    /// <summary>
    /// 获取仙侣称号
    /// </summary>
    public void GeTTitleRef()
    {
        List <int>  allCoupleTitle    = ConfigMng.Instance.GetTitleListByType(23);
        FDictionary coupleOwnTitleDic = GameCenter.titleMng.TitleDictionary;

        //bool isOwnCoupleTitle = false;
        for (int i = 0, max = allCoupleTitle.Count; i < max; i++)
        {
            if (coupleOwnTitleDic.ContainsKey(allCoupleTitle[i]))
            {
                TitleInfo info = coupleOwnTitleDic[allCoupleTitle[i]] as TitleInfo;
                //Debug.Log(    " des     "      + info.Des + "       icon     " + info.IconName  + "   isoen : " + info.IsOwn);
                if (info.IsOwn)
                {
                    //isOwnCoupleTitle = true;
                    titleRef = ConfigMng.Instance.GetTitlesRef(allCoupleTitle[i]);
                    if (allCoupleTitle.Count > (i + 1))
                    {
                        nextTitleRef = ConfigMng.Instance.GetTitlesRef(allCoupleTitle[i + 1]);
                    }
                    else
                    {
                        nextTitleRef = null;
                    }
                }
            }
        }
        if (titleRef == null)
        {
            nextTitleRef = ConfigMng.Instance.GetTitlesRef(allCoupleTitle[0]);
        }

        //if (!isOwnCoupleTitle)
        //{
        //    titleRef = null;
        //    if (allCoupleTitle.Count > 0)
        //        nextTitleRef = ConfigMng.Instance.GetTitlesRef(allCoupleTitle[0]);
        //    else
        //        nextTitleRef = null;
        //}
        //if (_title == CoupleTitle.CURTITLE)
        //    return titleRef;
        //else
        //    return nextTitleRef;
    }
示例#3
0
    void CoupleTitleUpdata()
    {
        TitleRef curTitle = GameCenter.coupleMng.titleRef;//当前称号

        if (curTitle != null)
        {
            if (curTitleIcon != null)
            {
                curTitleIcon.gameObject.SetActive(true);
            }
            if (noTitle != null)
            {
                noTitle.gameObject.SetActive(false);
            }
            if (curTitleIcon != null)
            {
                curTitleIcon.spriteName = curTitle.icon;
                curTitleIcon.MakePixelPerfect();
            }
        }
        else
        {
            if (curTitleIcon != null)
            {
                curTitleIcon.gameObject.SetActive(false);
            }
            if (noTitle != null)
            {
                noTitle.gameObject.SetActive(true);
            }
        }

        TitleRef nextTitleRef = GameCenter.coupleMng.nextTitleRef;//下级称号

        if (nextTitleRef != null)
        {
            if (nextTitleRef != null && nextTitleRef.judgeNum.Count > 0)
            {
                nextIntimacyLab.text = ConfigMng.Instance.GetUItext(25, new string[1] {
                    nextTitleRef.judgeNum[0].ToString()
                });
            }
            if (noNextLabel != null)
            {
                noNextLabel.SetActive(false);
            }
            if (nextIntimacyLab != null)
            {
                nextIntimacyLab.gameObject.SetActive(true);
            }
            if (nextTitleIcon != null)
            {
                nextTitleIcon.gameObject.SetActive(true);
                nextTitleIcon.spriteName = nextTitleRef.icon;
                nextTitleIcon.MakePixelPerfect();
            }
        }
        else
        {
            if (noNextLabel != null)
            {
                noNextLabel.SetActive(true);
            }
            if (nextIntimacyLab != null)
            {
                nextIntimacyLab.gameObject.SetActive(false);
            }
            if (nextTitleIcon != null)
            {
                nextTitleIcon.gameObject.SetActive(false);
            }
        }
    }