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); }
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); }