public void Init(MonthSignExtraVO vO, int signNum, int totalDate, int isGet)
    {
        _curAccumulateSigninDayTxt.text = I18NManager.Get("Activity_Hint6", GlobalData.ConfigModel.GetConfigByKey(GameConfigKey.MONTH_SIGN_RESET_DAY), signNum);
        _nameTxt.text = vO.Awards[0].Name;
        if (vO.IsCard)
        {
            _accumulateSigninCardTra.gameObject.Show();
            _accumulateSigninItemTra.gameObject.Hide();

            var path = "Activity/MonthSign_" + vO.Awards[0].Id;
            _accumulateSigninCardTra.GetRawImage().texture = ResourceManager.Load <Texture>(path, ModuleConfig.MODULE_ACTIVITY);
        }
        else
        {
            _accumulateSigninCardTra.gameObject.Hide();
            _accumulateSigninItemTra.gameObject.Show();
            var path = "Activity/MonthSign_" + vO.Awards[0].Id;
            _accumulateSigninItemTra.GetRawImage().texture = ResourceManager.Load <Texture>(path, ModuleConfig.MODULE_ACTIVITY);
        }

        if (signNum >= totalDate && isGet == 1)
        {
            _descTxt.text = I18NManager.Get("Activity_Hint8", vO.TotalDate);
        }
        else
        {
            _descTxt.text = I18NManager.Get("Activity_Hint1", vO.TotalDate);
        }

        CheckGetAccumulativeAward(signNum, isGet, totalDate);
    }
示例#2
0
    /// <summary>
    /// 初始化月签到累计
    /// </summary>
    private void InitMonthSignExtras()
    {
        _monthSignExtras = new Dictionary <int, MonthSignExtraVO>();

        foreach (var t in _monthSignExtraRule)
        {
            var monthSignExtraVo = new MonthSignExtraVO(t);
            _monthSignExtras.Add(t.Month, monthSignExtraVo);
        }

        var dt           = DateUtil.GetTodayDt();
        var curTimeStamp = ClientTimer.Instance.GetCurrentTimeStamp();
        var sixTimeStamp = DateUtil.GetNotTimezoneTimeStamp(new DateTime(dt.Year, dt.Month, _starDay, 6, 0, 0));

        _totalDate = curTimeStamp < sixTimeStamp ?
                     _monthSignExtras[DateUtil.GetTodayDt().AddMonths(-1).Month].TotalDate : _monthSignExtras[DateUtil.GetTodayDt().Month].TotalDate;
    }