|
@@ -11,7 +11,6 @@ namespace GFGGame
|
|
|
{
|
|
|
private UI_LeagueTeaPartyUI _ui;
|
|
|
private List<UI_comTeaPartyItem> teaPartyItemList = new List<UI_comTeaPartyItem>();
|
|
|
- private List<RoleContainerProto> roleContainerList = new List<RoleContainerProto>();
|
|
|
private List<TeapartyRoleCfg> teapartyRoleCfg;
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -42,7 +41,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_ListTeaParty.itemRenderer = ListTeaPartyItemRender;
|
|
|
|
|
|
- teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(1); //LeagueDataManager.Instance.TeaPartyId
|
|
|
+ teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
|
|
|
}
|
|
|
|
|
|
private void ListTeaPartyItemRender(int index, GObject obj)
|
|
@@ -54,9 +53,10 @@ namespace GFGGame
|
|
|
itemObj.m_iconRole.data = index;
|
|
|
itemObj.m_iconRole.onClick.Add(OnBtnIconRoleClick);
|
|
|
itemObj.m_txtRoleName.text = teapartyRoleCfg[index].name;
|
|
|
- //itemObj.m_txtMaxValue.text = roleContainerList[index].MaxScore.ToString();
|
|
|
- //itemObj.m_txtNumber.text = roleContainerList[index].PerNum.ToString();
|
|
|
- //itemObj.m_txtMaxName.text = roleContainerList[index].MaxScoreROleName.ToString();
|
|
|
+ var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
+ itemObj.m_txtMaxValue.text = roleContainerList[index].MaxScore.ToString();
|
|
|
+ itemObj.m_txtNumber.text = roleContainerList[index].PerNum.ToString();
|
|
|
+ itemObj.m_txtMaxName.text = roleContainerList[index].MaxScoreRoleName;
|
|
|
UI_comTeaPartyItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -68,33 +68,30 @@ namespace GFGGame
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
|
- var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(1);//LeagueDataManager.Instance.TeaPartyId
|
|
|
+ var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(LeagueDataManager.Instance.TeaPartyId);
|
|
|
_ui.m_txtTeaName.text = openCfg.name;
|
|
|
_ui.m_teaPartyItemTips.target.visible = false;
|
|
|
int myPos = LeagueDataManager.Instance.GetMyPos();
|
|
|
bool isLeader = myPos == LeaguePos.Owner || myPos == LeaguePos.SubOwner;
|
|
|
_ui.m_btnChallenge.visible = isLeader;
|
|
|
|
|
|
- UpDataOverTime();
|
|
|
-
|
|
|
- //GetRoleContainerInfos();
|
|
|
- roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
- _ui.m_ListTeaParty.numItems = 6;
|
|
|
+ GetRoleContainerInfos();
|
|
|
}
|
|
|
+
|
|
|
private void UpDataOverTime()
|
|
|
{
|
|
|
- //_ui.m_txtOverTime.text = "挑战剩余时间:" + TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
|
|
|
-
|
|
|
+ ET.Log.Debug("打印测试-------挑战剩余时间----11------" + TimeInfo.Instance.ServerNow());
|
|
|
+ ET.Log.Debug("打印测试------挑战剩余时间-----22------" + LeagueDataManager.Instance.TeaPartyCloseTime);
|
|
|
+ _ui.m_txtOverTime.text = "挑战剩余时间:" + TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), LeagueDataManager.Instance.TeaPartyCloseTime);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private async void GetRoleContainerInfos()
|
|
|
{
|
|
|
bool result = await LeagueSproxy.GetRoleContainerInfos();
|
|
|
if (result)
|
|
|
{
|
|
|
- roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
_ui.m_ListTeaParty.numItems = 6;
|
|
|
+ UpDataOverTime();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -115,10 +112,17 @@ namespace GFGGame
|
|
|
|
|
|
private void OnBtnChallengeClick()
|
|
|
{
|
|
|
- string stroyStartID = "50001";
|
|
|
- ViewManager.Show<StoryDialogView>(new object[] { stroyStartID, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog),null,true }, null, true);
|
|
|
+ TeapartyStartChallenge();
|
|
|
+ }
|
|
|
|
|
|
- //ViewManager.Show<LeagueTeaPartyOverView>();
|
|
|
+ private async void TeapartyStartChallenge()
|
|
|
+ {
|
|
|
+ bool result = await LeagueSproxy.TeapartyStartChallenge(RoleDataManager.roleId);
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ string stroyStartID = "50001";
|
|
|
+ ViewManager.Show<StoryDialogView>(new object[] { stroyStartID, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog), null, true }, null, true);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private static void OnCompletePriorStoryDialog(bool isSkip, object param)
|