|
@@ -1,4 +1,5 @@
|
|
|
|
|
|
|
|
+using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using ET;
|
|
using ET;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
@@ -12,8 +13,8 @@ namespace GFGGame
|
|
private UI_DailyWelfareUI _ui;
|
|
private UI_DailyWelfareUI _ui;
|
|
private ValueBarController _valueBarController;
|
|
private ValueBarController _valueBarController;
|
|
|
|
|
|
- private List<DailyTaskCfg> _cfgs;
|
|
|
|
- private List<DailyActiveRewardCfg> _rewardCfgs;
|
|
|
|
|
|
+ private int _month;
|
|
|
|
+ private int _day;
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
@@ -52,7 +53,8 @@ namespace GFGGame
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("mrqd_bjbj");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("mrqd_bjbj");
|
|
|
|
|
|
_valueBarController.OnShown();
|
|
_valueBarController.OnShown();
|
|
- _rewardCfgs = new List<DailyActiveRewardCfg>(DailyActiveRewardCfgArray.Instance.dataArray);
|
|
|
|
|
|
+ _month = DateTime.Now.Month;
|
|
|
|
+ _day = DateTime.Now.Day;
|
|
UpdateList();
|
|
UpdateList();
|
|
UpdateReward();
|
|
UpdateReward();
|
|
_ui.m_list.ScrollToView(0);
|
|
_ui.m_list.ScrollToView(0);
|
|
@@ -68,9 +70,28 @@ namespace GFGGame
|
|
{
|
|
{
|
|
ViewManager.GoBackFrom(typeof(DailyWelfareView).FullName);
|
|
ViewManager.GoBackFrom(typeof(DailyWelfareView).FullName);
|
|
}
|
|
}
|
|
|
|
+ private void UpdateSgignView()
|
|
|
|
+ {
|
|
|
|
+ _ui.m_txtSignCount.text = DailyWelfareManager.Instance.DailySignDatas.Count.ToString();
|
|
|
|
+ _ui.m_proSign.target.max = DailySignCfgArray.Instance.GetCfgsBymonth(_month).Count;
|
|
|
|
+ _ui.m_proSign.target.value = DailyWelfareManager.Instance.DailySignDatas.Count;
|
|
|
|
+ List<DailySignCfg> signCfgs = DailySignCfgArray.Instance.GetCfgsBymonth(_month);
|
|
|
|
+ for (int i = 0; i < signCfgs.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ GComponent comProBonus = _ui.m_proSign.target.GetChild("comProBonus" + i).asCom;
|
|
|
|
+ comProBonus.x = (signCfgs[i].day / (float)_ui.m_proSign.target.max) * _ui.m_proSign.target.width;
|
|
|
|
+ UI_ComProBonus item = UI_ComProBonus.Proxy(comProBonus);
|
|
|
|
+ item.m_loaIcon.url = ResPathUtil.GetIconPath(ItemCfgArray.Instance.GetCfg(signCfgs[i].bonusArr[0][0]));
|
|
|
|
+ // item
|
|
|
|
+ UI_ComProBonus.ProxyEnd();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ private void UpdateSupplyView()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
private void UpdateList()
|
|
private void UpdateList()
|
|
{
|
|
{
|
|
- _ui.m_list.numItems = _cfgs.Count;
|
|
|
|
}
|
|
}
|
|
private void UpdateReward()
|
|
private void UpdateReward()
|
|
{
|
|
{
|