|
@@ -21,6 +21,7 @@ namespace GFGGame
|
|
|
private GoWrapper _wrapper2;
|
|
|
private List<GameObject> _gameObjects = new List<GameObject>();
|
|
|
private List<GoWrapper> _wrappers = new List<GoWrapper>();
|
|
|
+ private List<GComponent> _items = new List<GComponent>();
|
|
|
private int _pageCount;
|
|
|
private int _type;
|
|
|
public override void Dispose()
|
|
@@ -28,10 +29,10 @@ namespace GFGGame
|
|
|
SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
|
|
|
SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
|
|
|
SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
|
|
|
- for (int i = 0; i < _gameObjects.Count; i++)
|
|
|
- {
|
|
|
- SceneController.DestroyObjectFromView(_gameObjects[i], _wrappers[i]);
|
|
|
- }
|
|
|
+ // for (int i = 0; i < _gameObjects.Count; i++)
|
|
|
+ // {
|
|
|
+ // SceneController.DestroyObjectFromView(_gameObjects[i], _wrappers[i]);
|
|
|
+ // }
|
|
|
if (_valueBarController != null)
|
|
|
{
|
|
|
_valueBarController.Dispose();
|
|
@@ -83,8 +84,11 @@ namespace GFGGame
|
|
|
_type = (int)this.viewData;
|
|
|
_valueBarController.OnShown();
|
|
|
_valueBarController.Controller(11);
|
|
|
- _ui.m_comSkill.m_list.numItems = LeagueSkillCountCfgArray.Instance.GetCfg(_type).layerCount;
|
|
|
- _ui.m_t0.Play();
|
|
|
+ _ui.m_t0.Play(() =>
|
|
|
+ {
|
|
|
+ _ui.m_comSkill.m_list.numItems = LeagueSkillCountCfgArray.Instance.GetCfg(_type).layerCount;
|
|
|
+ });
|
|
|
+
|
|
|
UpdateView();
|
|
|
}
|
|
|
|
|
@@ -93,10 +97,24 @@ namespace GFGGame
|
|
|
base.OnHide();
|
|
|
_valueBarController.OnHide();
|
|
|
if (_ui.m_comSkill.m_list.numItems > 0) _ui.m_comSkill.m_list.ScrollToView(0);
|
|
|
+ _ui.m_comSkill.m_list.numItems = 0;
|
|
|
_ui.m_t0.Stop();
|
|
|
_ui.m_t1.Stop();
|
|
|
+
|
|
|
+ DestroySkillAni();
|
|
|
}
|
|
|
+ private void DestroySkillAni()
|
|
|
+ {
|
|
|
+ for (int i = 0; i < _gameObjects.Count; i++)
|
|
|
+ {
|
|
|
+ SceneController.DestroyObjectFromView(_gameObjects[i], _wrappers[i]);
|
|
|
+ _items[i].RemoveChildAt(4);
|
|
|
+ }
|
|
|
+ _gameObjects.Clear();
|
|
|
+ _wrappers.Clear();
|
|
|
+ _items.Clear();
|
|
|
|
|
|
+ }
|
|
|
protected override void RemoveEventListener()
|
|
|
{
|
|
|
base.RemoveEventListener();
|
|
@@ -179,6 +197,10 @@ namespace GFGGame
|
|
|
{
|
|
|
item.m_listSkill.itemRenderer = RenderListSkillItem;
|
|
|
}
|
|
|
+ if (LeagueDataManager.Instance.CurLayer == index + 1)
|
|
|
+ {
|
|
|
+ DestroySkillAni();
|
|
|
+ }
|
|
|
item.m_listSkill.data = skillCfgs;
|
|
|
item.m_listSkill.numItems = skillCfgs.Count;
|
|
|
UI_ListSkillLayerItem.ProxyEnd();
|
|
@@ -204,29 +226,27 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
item.m_imgSuo.visible = !canActive;
|
|
|
- item.m_holder.visible = isLock && canActive;
|
|
|
- if (isLock && canActive)
|
|
|
+
|
|
|
+ if (isLock && canActive && _gameObjects.Count <= index)
|
|
|
{
|
|
|
GameObject gameObject = null;
|
|
|
GoWrapper wrapper = null;
|
|
|
- if (_gameObjects.Count > index)
|
|
|
- {
|
|
|
- gameObject = _gameObjects[index];
|
|
|
- wrapper = _wrappers[index];
|
|
|
- }
|
|
|
+ GGraph holder = new GGraph();
|
|
|
+ holder.SetSize(1, 1);
|
|
|
+ holder.SetPosition(80, 80, 0);
|
|
|
+ holder.name = "holder";
|
|
|
+ item.target.AddChildAt(holder, 4);
|
|
|
string resPath = ResPathUtil.GetViewEffectPath("ui_league", "tea_nolearn");
|
|
|
- SceneController.AddObjectToView(gameObject, wrapper, item.m_holder, resPath, out gameObject, out wrapper, 80);
|
|
|
+ SceneController.AddObjectToView(gameObject, wrapper, holder, resPath, out gameObject, out wrapper, 100);
|
|
|
|
|
|
- if (_gameObjects.Count <= index)
|
|
|
- {
|
|
|
- _gameObjects.Add(gameObject);
|
|
|
- _wrappers.Add(wrapper);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _gameObjects[index] = gameObject;
|
|
|
- _wrappers[index] = wrapper;
|
|
|
- }
|
|
|
+ _gameObjects.Add(gameObject);
|
|
|
+ _wrappers.Add(wrapper);
|
|
|
+ _items.Add(item.target);
|
|
|
+ }
|
|
|
+ GObject gObject = item.target.GetChild("holder");
|
|
|
+ if (gObject != null)
|
|
|
+ {
|
|
|
+ gObject.visible = isLock && canActive;
|
|
|
}
|
|
|
|
|
|
ItemUtil.UpdateItemNeedNum(item.m_comCost, skillCfgs[index].consumeArr[0], false, "#FFFBF4");
|