예제 #1
0
    public void addAchievementNum(AchievementType type, int count)
    {
        int num = PlayerPrefs.GetInt(KEY_ACHIEVENT_TYPE_NUM + type, 0);

        num += count;
        PlayerPrefs.SetInt(KEY_ACHIEVENT_TYPE_NUM + type, num);

        for (int i = 0; i < _achievementArray.Count; i++)
        {
            if (_achievementArray[i].type == type && _achievementArray[i].typeConfig <= num && PlayerPrefs.GetInt(KEY_ACHIEVENT_GET_DAY + _achievementArray[i].id, -1) == -1)
            {
                PlayerPrefs.SetInt(KEY_ACHIEVENT_GET_DAY + _achievementArray[i].id, TimeMgr.getCurTimeMgr().getCurDayFromStartDay());
                _achievementArray[i].compliteday = TimeMgr.getCurTimeMgr().getCurDayFromStartDay();
                getRewardById(_achievementArray[i].id);
            }
        }
    }