コード例 #1
0
    public void RefreshNum(ActivityCapsuleTemplateModel model)
    {
        if (model.costItem != null)
        {
            _costIcon.texture = PropUtils.GetPropIcon(model.costItem.ResourceId);
            _costIcon.color   = Color.white;
            int num = PropUtils.GetUserPropNum(model.costItem.ResourceId);
            //Debug.LogError("num====?"+num);
            _costNumText.text = num.ToString();

            bool capsuleState = false;
            if (num >= model.costItem.Num && !model.GainAllCapsuleItem())
            {
                capsuleState = true;
            }
            _lotteryRedPoint.SetActive(capsuleState);
        }
        _uiEffectObj.SetActive(true);
    }
コード例 #2
0
    public void SetData(ActivityCapsuleTemplateModel model)
    {
        //Debug.LogWarning("view  setData:" + model.GainAllCapsuleItem());
        if (model.costItem != null)
        {
            _costIcon.texture = PropUtils.GetPropIcon(model.costItem.ResourceId);
            _costIcon.color   = Color.white;
            int num = PropUtils.GetUserPropNum(model.costItem.ResourceId);
            _costNumText.text = num.ToString();

            bool capsuleState = false;
            if (num >= model.costItem.Num && !model.GainAllCapsuleItem())
            {
                capsuleState = true;
            }
            _lotteryRedPoint.SetActive(capsuleState);
        }
        _endTimeStamp = model.EndTimeStamp;
        SetActivityTime();

        _storyRedPoint.SetActive(model.HaveCanReadStory());

        _uiEffectObj.SetActive(true);
    }