Beispiel #1
0
    public void freshWithDailyReward(int daily, bool signed)
    {
        for (int i = 0, max = szDaily7Reward.Count; i < max; i++)
        {
            CDailyCellView cell = CDailyCellView.CreateCellView(i + 1);

            cell.freshDailyCell(szDaily7Reward[i], i + 1, daily + 1);

            SDK.AddChild(cell.gameObject, szCellPanel[i]);
        }


        if (signed)
        {
            curReward = szDaily7Reward[daily - 1];
        }
        else
        {
            curReward = szDaily7Reward[daily];
        }
    }
Beispiel #2
0
    public void freshDailyCell(MDDailyReward dr, int day, int curDay)
    {
        labGotNum.text          = dr.got_num.ToString();
        spRewardIcon.spriteName = dr.icon;
        spRewardIcon.MakePixelPerfect();
        labDaily.text = dr.day;

        if (curDay > day)
        {
            spCanGet.ESetActive(true);
            spRewardIcon.color = Color.white;
        }
        else if (curDay == day)
        {
            spRewardIcon.color = Color.white;
            spCanGet.ESetActive(false);
        }
        else
        {
            spRewardIcon.color = Color.gray;
            spCanGet.ESetActive(false);
        }
    }
Beispiel #3
0
    void InitDailyView(bool signed)
    {
        if (signed)
        {
            buttonOK.isEnabled = false;
            buttonOK.GetComponentInChildren <UILabel>().text        = "已领取";
            buttonOK.GetComponentInChildren <UISprite>().spriteName = "v3Button_gray";
            buttonOK.transform.parent.Find("Button_ok_1").GetComponentInChildren <UISprite>().spriteName = "v2Button_yellowred";
        }
        else
        {
            buttonOK.GetComponentInChildren <UILabel>().text = "领取";
            buttonOK.transform.parent.Find("Button_ok_1").GetComponentInChildren <UISprite>().spriteName = "v3Button_gray";
            buttonOK.GetComponentInChildren <UISprite>().spriteName = "v2Button_yellowred";
            buttonOK.isEnabled = true;
        }
        TextAsset ta = Resources.Load(WGConfig.Path_Daily) as TextAsset;

        using (StreamReader sr = new StreamReader(new MemoryStream(ta.bytes)))
        {
            MDDailyReward dr   = null;
            string        line = "";
            while (!string.IsNullOrEmpty(line = sr.ReadLine()))
            {
                dr = SDK.Deserialize <MDDailyReward>(line);
                szDaily7Reward.Add(dr);
            }
        }
        Resources.UnloadAsset(ta);
        labPayTip.ESetActive(false);
//		WGDataController _dataCtrl = WGDataController.Instance;
//		YHMDPayData payData=_dataCtrl.getYHMDPay(YHPayType.DOUBLE_reward);
//		float costMenoy=payData.payCost;
//		string payKey=payData.payKey.ToString();
////		float costMenoy = 30;
////		string payKey = "114";
////		if(YeHuoSDK.bUsePayCode2)
////		{
////			costMenoy = 20;
////			payKey = "214";
////		}
//		string okString = "ok";
//
//
//
//		#if YES_OK
//		string content = WGStrings.getFormateInt(1081,1104,"",costMenoy.ToString());
//		okString = WGStrings.getText(1104);
//		#elif YES_BUY
//		string content = WGStrings.getFormateInt(1081,1104,"",costMenoy.ToString());
//		okString = WGStrings.getText(1104);
//#elif YES_GET
//		string content = WGStrings.getFormateInt(1081,1101,"",costMenoy.ToString());
//		okString = WGStrings.getText(1101);
//		#elif YES_QueRen
//		string content = WGStrings.getFormateInt(1081,1104,"",costMenoy.ToString());
//		okString = WGStrings.getText(1104);
//		#else
//		string content = WGStrings.getFormateInt(1081,1101,"",costMenoy.ToString());
//		okString = WGStrings.getText(1101);
//		#endif
//		labPayTip.text = content;
//		labDoubleOkTitle.text = okString;
//		if(YeHuoSDK.mTipType != 0)
//		{
//			labPayTip.ESetActive(false);
//		}
    }