コード例 #1
0
ファイル: WelfareDataItem.cs プロジェクト: slb1988/agame
 public WelfareDataItem(WelfareDataItem welfareItem)
 {
     this.vipLevel     = welfareItem.vipLevel;
     this.payHCoin     = welfareItem.payHCoin;
     this.rewardID     = welfareItem.rewardID;
     this.rewardStatus = welfareItem.rewardStatus;
 }
コード例 #2
0
ファイル: MonoWelfareItem.cs プロジェクト: slb1988/agame
 public void SetupView(WelfareDataItem welfareDataItem, Action onGetBtnClick = null)
 {
     this._welfareDataItem = welfareDataItem;
     this._onGetBtnClick   = onGetBtnClick;
     if (welfareDataItem.rewardStatus == 2)
     {
         base.transform.Find("InnerPanel/BG/Get").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/BG/Unget").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/BG/Over").gameObject.SetActive(false);
         object[] replaceParams = new object[] { welfareDataItem.payHCoin };
         base.transform.Find("InnerPanel/BG/Get/Desc/Desc").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_ShopWelfareItemPayDesc", replaceParams);
         base.transform.Find("InnerPanel/Reward/RewardNo1").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/Reward/RewardNo2").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo3").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo1/Num/Num/num").GetComponent <Text>().text = welfareDataItem.vipLevel.ToString();
         base.transform.Find("InnerPanel/GetBtn").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/ProgressPanel").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/CompletePanel").gameObject.SetActive(false);
     }
     else if (welfareDataItem.rewardStatus == 1)
     {
         base.transform.Find("InnerPanel/BG/Unget").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/BG/Get").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/BG/Over").gameObject.SetActive(false);
         object[] objArray2 = new object[] { welfareDataItem.payHCoin };
         base.transform.Find("InnerPanel/BG/Unget/Desc/Desc").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_ShopWelfareItemPayDesc", objArray2);
         base.transform.Find("InnerPanel/Reward/RewardNo2").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/Reward/RewardNo1").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo3").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo2/Num/Num/num").GetComponent <Text>().text = welfareDataItem.vipLevel.ToString();
         base.transform.Find("InnerPanel/ProgressPanel").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/GetBtn").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/CompletePanel").gameObject.SetActive(false);
         int totalPayHCoin = Singleton <ShopWelfareModule> .Instance.totalPayHCoin;
         base.transform.Find("InnerPanel/ProgressPanel/HCoin/HCoin/Num").GetComponent <Text>().text = (welfareDataItem.payHCoin - totalPayHCoin).ToString();
         base.transform.Find("InnerPanel/ProgressPanel/ProgressBar").GetComponent <MonoMaskSlider>().UpdateValue((float)totalPayHCoin, (float)welfareDataItem.payHCoin, 0f);
     }
     if (welfareDataItem.rewardStatus == 3)
     {
         base.transform.Find("InnerPanel/BG/Over").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/BG/Unget").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/BG/Get").gameObject.SetActive(false);
         object[] objArray3 = new object[] { welfareDataItem.payHCoin };
         base.transform.Find("InnerPanel/BG/Over/Desc/Desc").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_ShopWelfareItemPayDescHasGot", objArray3);
         base.transform.Find("InnerPanel/Reward/RewardNo3").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/Reward/RewardNo1").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo2").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/Reward/RewardNo3/Num/Num/num").GetComponent <Text>().text = welfareDataItem.vipLevel.ToString();
         base.transform.Find("InnerPanel/CompletePanel").gameObject.SetActive(true);
         base.transform.Find("InnerPanel/GetBtn").gameObject.SetActive(false);
         base.transform.Find("InnerPanel/ProgressPanel").gameObject.SetActive(false);
     }
     this.SetupRewardList();
 }
コード例 #3
0
        private void OnScrollChange(Transform trans, int index)
        {
            WelfareDataItem welfareDataItem = this._welfareDataItemList[index];

            trans.GetComponent <MonoWelfareItem>().SetupView(welfareDataItem, this._onGetBtnClick);
        }