コード例 #1
0
    // Use this for initialization
    void Start()
    {
        DBFAchievement DBFTemp = (DBFAchievement)GameDBF.GetAchievement(pAchieve);

        pLb_Name.text = GameDBF.GetLanguage(DBFTemp.Name);
        pLb_Info.text = GameDBF.GetLanguage(8000 + (int)pAchieve);
    }
コード例 #2
0
    // ------------------------------------------------------------------
    public void Refresh()
    {
        DBFAchievement DBFTemp = (DBFAchievement)GameDBF.GetAchievement(pAchieve);

        if (DBFTemp == null)
        {
            return;
        }

        if (iLevel <= 0 || iLevel > GameDefine.iMaxAchievementLv)
        {
            return;
        }

        int  iValueNow  = DataAchievement.pthis.GetValue(pAchieve);
        int  iValueNeed = DBFTemp.GetValue(iLevel);
        bool bComplete  = iValueNow >= iValueNeed;

        pS_Check.enabled  = bComplete;
        pLb_Name.text     = GameDBF.GetLanguage(DBFTemp.Name) + " Lv " + iLevel;
        pLb_Progress.text = bComplete ? "---" : iValueNow + " / " + iValueNeed;
        pLb_Desc.text     = GameDBF.GetLanguage(8000 + (int)pAchieve);

        DBFReward DBFTemp2 = (DBFReward)GameDBF.GetReward(DBFTemp.GetReward(iLevel));

        if (DBFTemp2 == null)
        {
            return;
        }

        if (DBFTemp2.Reward == (int)ENUM_Reward.Looks)
        {
            pLb_Effect.text = GameDBF.GetLanguage(9000 + DBFTemp2.Note);
        }
        else
        {
            pLb_Effect.text = string.Format(GameDBF.GetLanguage(9000 + DBFTemp2.Note), DBFTemp2.Value);
        }

        RefreshIcon(DBFTemp2);
    }