Beispiel #1
0
 private void Refresh()
 {
     stars.SetData <RateStarItem, bool>(new bool[5], (index, item, data) =>
     {
         item.SetData(index, index <= mRateStars, OnClickStar);
     });
 }
Beispiel #2
0
        protected override void Update()
        {
            base.Update();

            for (int i = mViruses.Count - 1; i >= 0; i--)
            {
                var v = mViruses[i];
                if (!v.isAlive || GetDist(v) > table.effect3)
                {
                    mViruses.RemoveAt(i);
                }
            }
            foreach (var v in EntityManager.GetAll <VirusBase>())
            {
                var virus = v as VirusBase;
                if (typeof(VirusCure) != virus.GetType() &&
                    !mViruses.Contains(virus) &&
                    virus.isAlive &&
                    GetDist(virus) <= table.effect2)
                {
                    mViruses.Add(virus);
                }
            }

            linesGroup.SetData <CureLine, VirusBase>(mViruses, (index, item, data) =>
            {
                item.SetData(colorIndex, data.colorIndex, (data.position - position) / scale);
            });
        }
 public void SetData()
 {
     weaponGroup.SetData <WeaponItem, TableWeapon>(TableWeapon.GetAll(),
                                                   (index, item, data) =>
     {
         item.SetData(data.id);
     });
 }
Beispiel #4
0
        private void Update()
        {
            var proxy = ProxyManager.GetProxy <BuffProxy>();

            group.SetData <UIBuffItem, BuffData>(proxy.buffs.Values, (index, item, data) =>
            {
                item.SetData(data);
            });
        }
Beispiel #5
0
 private void RefreshUI()
 {
     levelPanel.SetData();
     shopGoods.SetData <ShopGoodsItem, TableShop>(TableShop.GetAll().ToList(a => a.type == 0)
                                                  , (index, item, _data) =>
     {
         item.SetData(_data.id);
     });
     vipBtn.targetImage.SetGrey(!D.I.IsVip());
     vipRewardText.gameObject.SetActive(D.I.IsVip());
 }
Beispiel #6
0
 private void OnUserList(UserListResult res)
 {
     Busy.Hide();
     if (res.isOK)
     {
         group.SetData <UserItem, UserInfo>(res.userInfos);
     }
     else
     {
         // Debug.LogError(res.errorMsg);
         Toast.Error(res.errorMsg);
     }
 }
Beispiel #7
0
        private void RefreshUI()
        {
            day6Group.SetData <DailySignItem, int>(new int[] { 1, 2, 3, 4, 5, 6 },
                                                   (index, item, _data) =>
            {
                item.SetData(_data);
            });
            day7.SetData(7);

            receiveBtn.SetBtnGrey(!D.I.CanDailySign());
            receiveBtn2.SetBtnGrey(!D.I.CanDailySign());

            receiveBtn2.gameObject.SetActive(!D.I.noAd);
        }
Beispiel #8
0
        private void RefreshUI()
        {
            var rewards = new List <Tuple <string, string> > {
                new Tuple <string, string>("icon_vip_fund", LT.Get("vipRewardFund")),
                new Tuple <string, string>("icon_vip_diamond", LT.Get("vipRewardDiamond")),
                new Tuple <string, string>("icon_vip_ad", LT.Get("vipRewardAd")),
                new Tuple <string, string>("icon_vip_difficulty", LT.Get("vipRewardDifficulty")),
                new Tuple <string, string>("icon_vip_revival", LT.Get("vipRewardRevival")),
            };

            rewardGroup.SetData <VipRewardItem, Tuple <string, string> >(rewards);
            radioBtn.Radio(!D.I.IsVip() ? 0 : D.I.HasVipReward() ? 1 : 2);
            expirationObj.SetActive(D.I.IsVip() && false);
            if (D.I.IsVip())
            {
                expirationTime.text = D.I.VipExpirationDate().ToString("yyyy-MM-dd HH:mm:ss");
            }
        }
Beispiel #9
0
 private void Refresh()
 {
     itemGroup.SetData <BookVirusItem, VirusData>(mVirus);
 }