|
@@ -42,6 +42,7 @@ namespace GFGGame
|
|
_ui.m_list.itemRenderer = RenderListItem;
|
|
_ui.m_list.itemRenderer = RenderListItem;
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
|
|
+ _ui.m_iconSuidAdd.onClick.Add(OnClickIconSuidAdd);
|
|
}
|
|
}
|
|
|
|
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
@@ -62,6 +63,8 @@ namespace GFGGame
|
|
_storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
|
|
_storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
|
|
_ui.m_list.numItems = _storyLevelCfgs.Count;
|
|
_ui.m_list.numItems = _storyLevelCfgs.Count;
|
|
UpdateItem();
|
|
UpdateItem();
|
|
|
|
+
|
|
|
|
+ _ui.m_txtFreeNum.text = "10/11";
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -79,10 +82,15 @@ namespace GFGGame
|
|
ViewManager.GoBackFrom(typeof(OpenServerFightView).FullName);
|
|
ViewManager.GoBackFrom(typeof(OpenServerFightView).FullName);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void OnClickIconSuidAdd()
|
|
|
|
+ {
|
|
|
|
+ ViewManager.GoBackFrom(typeof(OpenServerFightView).FullName);
|
|
|
|
+ }
|
|
|
|
+
|
|
private void RenderListItem(int index, GObject obj)
|
|
private void RenderListItem(int index, GObject obj)
|
|
{
|
|
{
|
|
// int _index = _storyLevelCfgs.Count - index - 1;
|
|
// int _index = _storyLevelCfgs.Count - index - 1;
|
|
- UI_ListLevelItem item = UI_ListLevelItem.Proxy(obj);
|
|
|
|
|
|
+ UI_OpenSererFightItem item = UI_OpenSererFightItem.Proxy(obj);
|
|
//item.m_c1.selectedIndex = index % 2 == 0 ? 0 : 1;
|
|
//item.m_c1.selectedIndex = index % 2 == 0 ? 0 : 1;
|
|
item.m_txtName.text = _storyLevelCfgs[index].name;
|
|
item.m_txtName.text = _storyLevelCfgs[index].name;
|
|
bool isFight = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID);
|
|
bool isFight = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID);
|
|
@@ -112,13 +120,19 @@ namespace GFGGame
|
|
item.m_loaIcon.url = string.Format("ui://Studio/{0}", _activityFightCfg.res);
|
|
item.m_loaIcon.url = string.Format("ui://Studio/{0}", _activityFightCfg.res);
|
|
}
|
|
}
|
|
item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
|
|
item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
|
|
|
|
+
|
|
|
|
+ if (!item.m_grpLock.visible)
|
|
|
|
+ item.m_comFirstPass.visible = !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index].id);
|
|
|
|
+ else
|
|
|
|
+ item.m_comFirstPass.visible = false;
|
|
|
|
+
|
|
item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
|
|
item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
|
|
if (item.m_loaBg.data == null)
|
|
if (item.m_loaBg.data == null)
|
|
{
|
|
{
|
|
item.m_loaBg.onClick.Add(OnListItemClick);
|
|
item.m_loaBg.onClick.Add(OnListItemClick);
|
|
}
|
|
}
|
|
item.m_loaBg.data = index;
|
|
item.m_loaBg.data = index;
|
|
- UI_ListLevelItem.ProxyEnd();
|
|
|
|
|
|
+ UI_OpenSererFightItem.ProxyEnd();
|
|
}
|
|
}
|
|
|
|
|
|
private void OnListItemClick(EventContext context)
|
|
private void OnListItemClick(EventContext context)
|