|
@@ -17,9 +17,8 @@ namespace GFGGame
|
|
|
private EffectUI _effectUI2;
|
|
|
private EffectUI _effectUI3;
|
|
|
private List<EffectUI> _effectUIs = new List<EffectUI>();
|
|
|
- private List<GComponent> _items = new List<GComponent>();
|
|
|
- private int _pageCount;
|
|
|
private int _type;
|
|
|
+ private int saveListPageIndex = 0;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -67,7 +66,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("lm_ch_jnbg");
|
|
|
|
|
|
- _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_league", "TEA");
|
|
|
+ _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_league", "TEA",110);
|
|
|
_effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderSkill, "ui_league", "tea_unlock");
|
|
|
_effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_holderScore, "ui_league", "tea_unlock");
|
|
|
}
|
|
@@ -108,11 +107,9 @@ namespace GFGGame
|
|
|
for (int i = 0; i < _effectUIs.Count; i++)
|
|
|
{
|
|
|
EffectUIPool.Recycle(_effectUIs[i]);
|
|
|
- _items[i].RemoveChildAt(4);
|
|
|
+ _effectUIs[i] = null;
|
|
|
}
|
|
|
-
|
|
|
_effectUIs.Clear();
|
|
|
- _items.Clear();
|
|
|
}
|
|
|
|
|
|
protected override void RemoveEventListener()
|
|
@@ -132,7 +129,9 @@ namespace GFGGame
|
|
|
int curPage = index / _ui.m_comSkill.m_list.lineCount;
|
|
|
int nextPage = curPage + 1;
|
|
|
if (nextPage * _ui.m_comSkill.m_list.lineCount > _ui.m_comSkill.m_list.numItems - 1) return;
|
|
|
- _ui.m_comSkill.m_list.ScrollToView(nextPage * _ui.m_comSkill.m_list.lineCount, true);
|
|
|
+ DestroySkillAni();
|
|
|
+ saveListPageIndex = nextPage * _ui.m_comSkill.m_list.lineCount;
|
|
|
+ _ui.m_comSkill.m_list.ScrollToView(saveListPageIndex, true);
|
|
|
Debug.Log("curPage:" + nextPage);
|
|
|
}
|
|
|
|
|
@@ -142,7 +141,9 @@ namespace GFGGame
|
|
|
int curPage = index / _ui.m_comSkill.m_list.lineCount;
|
|
|
int lastPage = curPage - 1;
|
|
|
if (lastPage * _ui.m_comSkill.m_list.lineCount < 0) return;
|
|
|
- _ui.m_comSkill.m_list.ScrollToView(lastPage * _ui.m_comSkill.m_list.lineCount, true);
|
|
|
+ DestroySkillAni();
|
|
|
+ saveListPageIndex = lastPage * _ui.m_comSkill.m_list.lineCount;
|
|
|
+ _ui.m_comSkill.m_list.ScrollToView(saveListPageIndex, true);
|
|
|
Debug.Log("curPage:" + lastPage);
|
|
|
}
|
|
|
|
|
@@ -230,12 +231,13 @@ namespace GFGGame
|
|
|
item.m_loaIcon.url = string.Format("ui://League/tb_jn_{0}", _type);
|
|
|
bool isLock = !SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(_type) ||
|
|
|
SkillDataManager.Instance.LeagueSkillDatas[_type].IndexOf(skillCfgs[index].id) < 0;
|
|
|
-
|
|
|
+
|
|
|
item.m_imgLock.visible = isLock;
|
|
|
|
|
|
bool canActive = true;
|
|
|
List<LeagueSkillCfg> lastSkillCfgs =
|
|
|
- LeagueSkillCfgArray.Instance.GetCfgsBytypeAndlayer(_type, skillCfgs[index].layer - 1);
|
|
|
+ LeagueSkillCfgArray.Instance.GetCfgsBytypeAndlayer(_type, skillCfgs[index].layer - 1);
|
|
|
+
|
|
|
for (int i = 0; i < lastSkillCfgs.Count; i++)
|
|
|
{
|
|
|
if (!SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(_type) ||
|
|
@@ -246,28 +248,18 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!canActive)
|
|
|
- item.m_c1.selectedIndex = 0;
|
|
|
- else
|
|
|
- item.m_c1.selectedIndex = 1;
|
|
|
+ item.m_imgSuo.visible = !canActive;
|
|
|
|
|
|
if (isLock && canActive && _effectUIs.Count <= index)
|
|
|
{
|
|
|
- GGraph holder = new GGraph();
|
|
|
- holder.SetSize(1, 1);
|
|
|
- holder.SetPosition(80, 80, 0);
|
|
|
- holder.name = "holder";
|
|
|
- item.target.AddChildAt(holder, 4);
|
|
|
- EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_league", "tea_nolearn");
|
|
|
+ EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holdeLight, "ui_league", "tea_nolearn");
|
|
|
_effectUIs.Add(_effectUI);
|
|
|
- _items.Add(item.target);
|
|
|
}
|
|
|
|
|
|
- GObject gObject = item.target.GetChild("holder");
|
|
|
- if (gObject != null)
|
|
|
- {
|
|
|
- gObject.visible = isLock && canActive;
|
|
|
- }
|
|
|
+ if (isLock && canActive)
|
|
|
+ item.m_c1.selectedIndex = 1;
|
|
|
+ else
|
|
|
+ item.m_c1.selectedIndex = 0;
|
|
|
|
|
|
ItemUtil.UpdateItemNeedNum(item.m_comCost, skillCfgs[index].consumeArr[0], false, "#FFFBF4");
|
|
|
if (item.target.data == null)
|