コード例 #1
0
    private void UpdatePanel()
    {
        GrowthPlanListPush growthPlanListPush = GrowUpPlanManager.Instance.GetGrowUpPlanData();

        if (growthPlanListPush == null)
        {
            return;
        }
        if (growthPlanListPush.item == null)
        {
            return;
        }
        this.UpdateBuyBtn(!growthPlanListPush.hasBuy);
        this.canVipLv = growthPlanListPush.vipLv;
        string text = string.Format(GameDataUtils.GetChineseContent(513179, false), growthPlanListPush.vipLv);

        this.textVipLevel.set_text(text);
        this.textBuyDiamond.set_text("x" + growthPlanListPush.price);
        growthPlanListPush = this.DataSort(growthPlanListPush);
        this.ClearScroll();
        for (int i = 0; i < growthPlanListPush.item.get_Count(); i++)
        {
            this.AddScrollCell(i, growthPlanListPush.item.get_Item(i), growthPlanListPush.typeId);
        }
    }
コード例 #2
0
 private GrowthPlanListPush DataSort(GrowthPlanListPush down)
 {
     down.item.Sort(delegate(GrowthPlanListPush.Items a, GrowthPlanListPush.Items b)
     {
         int buttonState  = GrowUpPlanUI.GetButtonState(a.hasGetPrize, a.canGetFlag);
         int buttonState2 = GrowUpPlanUI.GetButtonState(b.hasGetPrize, b.canGetFlag);
         int result       = 0;
         if (buttonState != buttonState2)
         {
             if (buttonState == 2)
             {
                 result = -1;
             }
             else if (buttonState == 1 && buttonState2 != 2)
             {
                 result = -1;
             }
         }
         else
         {
             result = a.roleLv.CompareTo(b.roleLv);
         }
         return(result);
     });
     return(down);
 }
コード例 #3
0
    private void ScrollToAvailableCell()
    {
        GrowthPlanListPush growUpPlanData = GrowUpPlanManager.Instance.GetGrowUpPlanData();
        RectTransform      component      = this.m_awardlist.GetComponent <RectTransform>();

        component.set_localPosition(new Vector3(0f, 0f, 0f)
        {
            y = (float)(-(float)growUpPlanData.item.get_Count()) * (this.m_awardlist.get_cellSize().y + this.m_awardlist.get_spacing().y)
        });
    }
コード例 #4
0
 public void OnUpdatePanel(short state, GrowthPlanListPush down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down != null)
     {
         this.UpdateData(down);
         this.RefreshUI();
     }
     else
     {
         Debug.LogError("OperateAcPushClient  is  empty!________________________________________________________________________");
     }
 }
コード例 #5
0
 private void UpdateData(GrowthPlanListPush data)
 {
     this.dataList = data;
 }