Beispiel #1
0
 public void refreshCostGoldNum(int refreshTime)
 {
     lastcost = _supporterActivityModel.GetRefreshCost(refreshTime + 1).Gold;
     for (int i = 0; i < _activityList.childCount; i++)
     {
         var costGoldNum = _activityList.GetChild(i).Find("NotSupport/Icon/Num")
                           .GetComponent <Text>();
         costGoldNum.text = lastcost.ToString();
     }
 }
Beispiel #2
0
        public void SetData(UserEncourageActVo vo, SupporterActivityModel supporterActivityModel)
        {
            _userEncourageActVo = vo;
            _encourageActRuleVo = supporterActivityModel.EncourageRuleDic[vo.ActId];
            _supporterName.text = _encourageActRuleVo.Title;
            _changeCost.text    = supporterActivityModel.GetRefreshCost(supporterActivityModel.RefreshCount + 1).Gold
                                  .ToString();
            _timeLabel.text = I18NManager.Get("SupporterActivity_Time", _encourageActRuleVo.NeedTime / 60);//"时间" + + "小时";
            //_leftEnerge.text = "消耗:" + _encourageActRuleVo.Power;
            for (int k = 0; k < 3; k++)
            {
                _fansList.GetChild(k).gameObject.Hide();
                _propList.GetChild(k).gameObject.Hide();
            }


            var i = 0;

            foreach (var v in _encourageActRuleVo.Fans)
            {
                _fansList.GetChild(i).gameObject.Show();
                SetFansData(_fansList.GetChild(i), v.Key, v.Value);
                i++;
            }

            for (int k = 0; k < _fansList.childCount; k++)
            {
                if (!_fansList.GetChild(k).gameObject.activeInHierarchy)
                {
                    _fansList.GetChild(k).gameObject.Show();
                    SetFansData(_fansList.GetChild(k), 0, 0);
                }
            }


            var j = 0;

            foreach (var v in _encourageActRuleVo.Consume)
            {
                _propList.GetChild(j).gameObject.Show();
                PointerClickListener.Get(_propList.GetChild(j).gameObject).onClick = null;
                PointerClickListener.Get(_propList.GetChild(j).gameObject).onClick = go =>
                {
                    FlowText.ShowMessage(I18NManager.Get("SupporterActivity_ItemPath"));
                };
                SetPropData(_propList.GetChild(j), v.Key, v.Value);
                j++;
            }

            SetSupporterEnergy();
        }