|
@@ -5,16 +5,23 @@ using UI.DressUp;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
using UI.ActivityAfternoonTea;
|
|
using UI.ActivityAfternoonTea;
|
|
using UI.CommonGame;
|
|
using UI.CommonGame;
|
|
|
|
+using ET;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
public class ActivitySyntheticView : BaseWindow
|
|
public class ActivitySyntheticView : BaseWindow
|
|
{
|
|
{
|
|
private UI_ActivitySyntheticUI _ui;
|
|
private UI_ActivitySyntheticUI _ui;
|
|
|
|
+ private ValueBarController _valueBarController;
|
|
private SuitCfg _suitCfg;
|
|
private SuitCfg _suitCfg;
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
|
|
+ if (_valueBarController != null)
|
|
|
|
+ {
|
|
|
|
+ _valueBarController.Dispose();
|
|
|
|
+ _valueBarController = null;
|
|
|
|
+ }
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
_ui.Dispose();
|
|
_ui.Dispose();
|
|
@@ -31,6 +38,7 @@ namespace GFGGame
|
|
this.viewCom = _ui.target;
|
|
this.viewCom = _ui.target;
|
|
isfullScreen = true;
|
|
isfullScreen = true;
|
|
isReturnView = true;
|
|
isReturnView = true;
|
|
|
|
+ _valueBarController = new ValueBarController(_ui.m_valueBar);
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
_ui.m_listSynthetic.itemRenderer = RenderListSyntheticItem;
|
|
_ui.m_listSynthetic.itemRenderer = RenderListSyntheticItem;
|
|
}
|
|
}
|
|
@@ -38,9 +46,15 @@ namespace GFGGame
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
|
|
+
|
|
|
|
+ _valueBarController.OnShown();
|
|
|
|
+ _valueBarController.Controller(6);
|
|
|
|
+
|
|
ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(5005);
|
|
ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(5005);
|
|
_suitCfg = SuitCfgArray.Instance.GetCfg(activityOpenCfg.paramsArr[0]);
|
|
_suitCfg = SuitCfgArray.Instance.GetCfg(activityOpenCfg.paramsArr[0]);
|
|
_ui.m_listSynthetic.numItems = _suitCfg.partsArr.Length;
|
|
_ui.m_listSynthetic.numItems = _suitCfg.partsArr.Length;
|
|
|
|
+ RefreshTimeText();
|
|
|
|
+ _ui.m_txtTips.SetVar("name", _suitCfg.name).FlushVars();
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
@@ -48,6 +62,14 @@ namespace GFGGame
|
|
ViewManager.GoBackFrom(typeof(ActivitySyntheticView).FullName);
|
|
ViewManager.GoBackFrom(typeof(ActivitySyntheticView).FullName);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void RefreshTimeText()
|
|
|
|
+ {
|
|
|
|
+ ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(5005);
|
|
|
|
+ long time = TimeUtil.DateTimeToTimestamp(activityOpenCfg.endTime) - TimeHelper.ServerNow();
|
|
|
|
+ string strTime = TimeUtil.FormattingTimeTo_DDHHmm(time);
|
|
|
|
+ _ui.m_txtTime.text = "Ê£Óà:" + strTime;
|
|
|
|
+ }
|
|
|
|
+
|
|
private void RenderListSyntheticItem(int index, GObject obj)
|
|
private void RenderListSyntheticItem(int index, GObject obj)
|
|
{
|
|
{
|
|
UI_SyntheticItemUI comBox = UI_SyntheticItemUI.Proxy(obj);
|
|
UI_SyntheticItemUI comBox = UI_SyntheticItemUI.Proxy(obj);
|
|
@@ -93,7 +115,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
comBox.m_btnType.selectedIndex = 2;
|
|
comBox.m_btnType.selectedIndex = 2;
|
|
}
|
|
}
|
|
- else if (materiarsArr[0][1] >= ItemDataManager.GetItemNum(materiarsArr[0][0]) && materiarsArr[1][1] >= ItemDataManager.GetItemNum(materiarsArr[1][0]))
|
|
|
|
|
|
+ else if (ItemDataManager.GetItemNum(materiarsArr[0][0]) >= materiarsArr[0][1] && ItemDataManager.GetItemNum(materiarsArr[1][0]) >= materiarsArr[1][1])
|
|
{
|
|
{
|
|
comBox.m_btnType.selectedIndex = 1;
|
|
comBox.m_btnType.selectedIndex = 1;
|
|
if(comBox.m_btnMake.data == null)
|
|
if(comBox.m_btnMake.data == null)
|
|
@@ -115,7 +137,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
if (!(context.sender is GObject obj)) return;
|
|
if (!(context.sender is GObject obj)) return;
|
|
int itemID = (int)obj.data;
|
|
int itemID = (int)obj.data;
|
|
- bool result = await ActivityTeaSProxy.ReqItemSynthetic(itemID);
|
|
|
|
|
|
+ bool result = await ActivityTeaSProxy.ReqItemSynthetic( 5005 , itemID);
|
|
if (result)
|
|
if (result)
|
|
{
|
|
{
|
|
_ui.m_listSynthetic.numItems = _suitCfg.partsArr.Length;
|
|
_ui.m_listSynthetic.numItems = _suitCfg.partsArr.Length;
|