|
@@ -11,6 +11,7 @@ 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()
|
|
|
{
|
|
@@ -30,7 +31,7 @@ namespace GFGGame
|
|
|
this.viewCom = _ui.target;
|
|
|
isfullScreen = true;
|
|
|
|
|
|
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("chahuibg");
|
|
|
+ _ui.m_loaBg.url = ResPathUtil.GetDressUpPath("chahuibg");
|
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
|
_ui.m_btnChat.onClick.Add(OnBtnChatClick);
|
|
|
_ui.m_btnChallenge.onClick.Add(OnBtnChallengeClick);
|
|
@@ -47,12 +48,15 @@ namespace GFGGame
|
|
|
private void ListTeaPartyItemRender(int index, GObject obj)
|
|
|
{
|
|
|
UI_comTeaPartyItem itemObj = UI_comTeaPartyItem.Proxy(obj);
|
|
|
-
|
|
|
+ Vector2 localpos = obj.position;//.LocalToGlobal();
|
|
|
+ itemObj.m_btnDetail.data = localpos;
|
|
|
itemObj.m_btnDetail.onClick.Add(OnBtnDetailClick);
|
|
|
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();
|
|
|
UI_comTeaPartyItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -64,24 +68,33 @@ namespace GFGGame
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
|
- GetRoleContainerInfos();
|
|
|
var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(1);//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;
|
|
|
}
|
|
|
+ private void UpDataOverTime()
|
|
|
+ {
|
|
|
+ //_ui.m_txtOverTime.text = "挑战剩余时间:" + TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private async void GetRoleContainerInfos()
|
|
|
{
|
|
|
bool result = await LeagueSproxy.GetRoleContainerInfos();
|
|
|
if (result)
|
|
|
{
|
|
|
- var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
- for (int index = 0; index < roleContainerList.Count; index++){
|
|
|
- teaPartyItemList[index].m_txtMaxValue.text = roleContainerList[index].MaxScore.ToString();
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+ roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
+ _ui.m_ListTeaParty.numItems = 6;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -102,8 +115,14 @@ namespace GFGGame
|
|
|
|
|
|
private void OnBtnChallengeClick()
|
|
|
{
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("开始挑战");
|
|
|
+ string stroyStartID = "50001";
|
|
|
+ ViewManager.Show<StoryDialogView>(new object[] { stroyStartID, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog),null,true }, null, true);
|
|
|
|
|
|
+ //ViewManager.Show<LeagueTeaPartyOverView>();
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void OnCompletePriorStoryDialog(bool isSkip, object param)
|
|
|
+ {
|
|
|
ViewManager.Show<LeagueTeaPartyOverView>();
|
|
|
}
|
|
|
|
|
@@ -117,11 +136,17 @@ namespace GFGGame
|
|
|
ViewManager.GoBackFrom(typeof(LeagueView).FullName);
|
|
|
}
|
|
|
|
|
|
- private void OnBtnDetailClick()
|
|
|
+
|
|
|
+ private void OnBtnDetailClick(EventContext context)
|
|
|
{
|
|
|
+ GObject obj = context.sender as GObject;
|
|
|
+ var pos = (Vector2)obj.data;
|
|
|
+
|
|
|
+ //_ui.m_teaPartyItemTips.m_window.position = pos;
|
|
|
+
|
|
|
_ui.m_teaPartyItemTips.target.visible = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void OnTeaPartyItemTipsClick()
|
|
|
{
|
|
|
_ui.m_teaPartyItemTips.target.visible = false;
|