Example #1
0
 void InitCellInfo()
 {
     for (int i = 0; i < dataObj_.Count; i++)
     {
         HuoDongCell hcell = dataObj_[i].GetComponent <HuoDongCell>();
         if (hcell == null)
         {
             continue;
         }
         if (hcell.daData_ == null)
         {
             continue;
         }
         hcell.InitbtnState();
     }
 }
Example #2
0
 public void ClearActivity()
 {
     for (int i = 0; i < dataObj_.Count; i++)
     {
         HuoDongCell hcell = dataObj_[i].GetComponent <HuoDongCell>();
         if (hcell == null)
         {
             continue;
         }
         if (hcell.daData_ == null)
         {
             continue;
         }
         hcell.RefreshFinishProgress(0);
     }
 }
Example #3
0
    void PlayerActivityEventOk()
    {
        ClearActivity();
        int gb = 0;
        COM_ActivityTable table = GamePlayer.Instance.ActivityTable;

        if (table == null)
        {
            return;
        }
        pBar.value = GamePlayer.Instance.ActivityTable.reward_ / 100f;
        if (yuandianSp.transform.localPosition.x >= 1158)
        {
            yuandianSp.transform.localPosition = new Vector3(1158, 0, 0);
        }
        else
        {
            yuandianSp.transform.localPosition = new Vector3(1158 * GamePlayer.Instance.ActivityTable.reward_ / 100f, 0, 0);
        }

        actCountLab.text = GamePlayer.Instance.ActivityTable.reward_.ToString();
        for (int i = 0; i < dataObj_.Count; i++)
        {
            //if(!dataObj_[i].activeSelf)continue;
            HuoDongCell hcell = dataObj_[i].GetComponent <HuoDongCell>();
            if (hcell == null)
            {
                continue;
            }
            for (int j = 0; j < table.activities_.Length; j++)
            {
                if (hcell.daData_ == null)
                {
                    continue;
                }
                if (hcell.daData_.id_ == table.activities_[j].actId_)
                {
                    hcell.RefreshFinishProgress(table.activities_[j].counter_);
                }
            }
        }
    }