コード例 #1
0
ファイル: UserM.cs プロジェクト: 741645596/batgame
    /// <summary>
    /// 获取成就头像
    /// </summary>
    public static List <int> GetAchievementPortraits(PortraitPartType portraitPartType)
    {
        List <int> portraits = new List <int>();

        for (int i = 0; i < m_lRevisehead.Count; i++)
        {
            int id = m_lRevisehead[i].id;
            if (id / 1000000 == (int)portraitPartType)
            {
            }
        }
        return(portraits);
    }
コード例 #2
0
 void ShowList(PortraitPartType portraitPartType)
 {
     if ((portraitPartType & PortraitPartType.Portrait) == PortraitPartType.Portrait)
     {
         ShowOrdinaryPortrait(PortraitPartType.Portrait);
         ShowAchievementPortraits(PortraitPartType.Portrait);
     }
     if ((portraitPartType & PortraitPartType.Frame) == PortraitPartType.Frame)
     {
         ShowOrdinaryPortrait(PortraitPartType.Frame);
         ShowAchievementPortraits(PortraitPartType.Frame);
     }
 }
コード例 #3
0
    void ShowAchievementPortraits(PortraitPartType portraitPartType)
    {
        List <int> portraits = UserM.GetAchievementPortraits(portraitPartType);

        for (int i = 0; i < portraits.Count; i++)
        {
            GameObject go       = NDLoad.LoadWndItem("HeadItem", mAttachRoot[(int)PortratiType.Achivement].transform);
            HeadItem   headItem = go.GetComponent <HeadItem>();
            headItem.Init(this);
            headItem.ShowPortrait(portraitPartType, portraits[i]);
            mHeadItem.Add(headItem);
        }
        mAttachRoot[(int)PortratiType.Achivement].Reposition();
    }
コード例 #4
0
 public void ShowPortrait(PortraitPartType portraitPartType, int portraitID)
 {
     Reset();
     if ((portraitPartType & PortraitPartType.Portrait) == PortraitPartType.Portrait)
     {
         mHeadID = portraitID;
         NGUIUtil.Set2DSprite(Spr2DHeadIcon, "Textures/role/", portraitID.ToString());
         Spr2DHeadIcon.gameObject.SetActive(true);
         SprHeadQuality.gameObject.SetActive(true);
     }
     if ((portraitPartType & PortraitPartType.Frame) == PortraitPartType.Frame)
     {
         mHeadFrameID = portraitID;
         SprHeadQuality.spriteName = portraitID.ToString();
         SprHeadQuality.gameObject.SetActive(true);
     }
     //if ((portraitPartType | PortraitPartType.Background) == PortraitPartType.Background)
     //{
     //	mHeadID = portraitID;
     //	SprHeadQuality.spriteName = portraitID.ToString();
     //	SprHeadQuality.gameObject.SetActive(true);
     //}
 }
コード例 #5
0
ファイル: UserM.cs プロジェクト: 741645596/batgame
    /// <summary>
    /// 获取普通头像
    /// </summary>
    public static List <int> GetOrdinaryPortraits(PortraitPartType portraitPartType)
    {
        List <int> portraits = new List <int>();

        for (int i = 0; i < m_lRevisehead.Count; i++)
        {
            int id = m_lRevisehead[i].id;
            if (id / 1000000 == (int)portraitPartType)
            {
                int achievement = m_lRevisehead[i].achieve;
                if (achievement > 0)
                {
                    continue;
                }
                //int playerAchievement = FruitionDC.GetCurFruition();
                //if (playerAchievement >= achievement)
                {
                    id = id - 1000000 * (int)portraitPartType;
                    portraits.Add(id);
                }
            }
        }
        return(portraits);
    }