|
@@ -21,7 +21,7 @@ namespace GFGGame
|
|
|
// private List<GoWrapper> _wrappers = new List<GoWrapper>();
|
|
|
// private List<GameObject> _gameObjects1 = new List<GameObject>();
|
|
|
// private List<GoWrapper> _wrappers1 = new List<GoWrapper>();
|
|
|
- private Dictionary<int, List<EffectUI>> dicEffect = new Dictionary<int, List<EffectUI>>();
|
|
|
+ private List<EffectUI> dicEffect = new List<EffectUI>();
|
|
|
private List<EffectUI> effObj = new List<EffectUI>();
|
|
|
private EffectUI _effectUI1;
|
|
|
private EffectUI _effectUI2;
|
|
@@ -61,30 +61,27 @@ namespace GFGGame
|
|
|
for (int i = comStar.target.numChildren - 1; i >= 0; i--)
|
|
|
{
|
|
|
if (comStar.target.GetChildAt(i).name == "comLine") continue;
|
|
|
- comStar.target.RemoveChildAt(i);
|
|
|
+ var starchild = comStar.target.RemoveChildAt(i);
|
|
|
+ starchild.Dispose();
|
|
|
}
|
|
|
index++;
|
|
|
star = _ui.target.GetChild(string.Format("comStar{0}_{1}_{2}", _ui.m_ctrlBuyType.selectedIndex, _ui.m_ctrlRewardsType.selectedIndex, index));
|
|
|
UI_ComStar.ProxyEnd();
|
|
|
}
|
|
|
- foreach (int key in dicEffect.Keys)
|
|
|
+ for (int i = 0; i < dicEffect.Count; i++)
|
|
|
{
|
|
|
- List<EffectUI> value = dicEffect[key];
|
|
|
- for (int i = 0; i < value.Count; i++)
|
|
|
- {
|
|
|
- EffectUIPool.Recycle(value[i]);
|
|
|
- value[i] = null;
|
|
|
- }
|
|
|
+ EffectUIPool.Recycle(dicEffect[i]);
|
|
|
+ dicEffect[i] = null;
|
|
|
}
|
|
|
for (int i = 0; i < effObj.Count; i++)
|
|
|
{
|
|
|
EffectUIPool.Recycle(effObj[i]);
|
|
|
effObj[i] = null;
|
|
|
}
|
|
|
-
|
|
|
notClickComStars.Clear();
|
|
|
clickComStars.Clear();
|
|
|
dicEffect.Clear();
|
|
|
+ effObj.Clear();
|
|
|
|
|
|
Timers.inst.Remove(CheckGuide);
|
|
|
Debug.Log("OnHide LuckyBoxStarView");
|
|
@@ -132,11 +129,13 @@ namespace GFGGame
|
|
|
showGuide = GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX_LINE) <= 0;
|
|
|
|
|
|
curComStar = null;
|
|
|
+ for (int i = 0; i < comStars.Count; i++) {
|
|
|
+ comStars.RemoveAt(i);
|
|
|
+ }
|
|
|
comStars.Clear();
|
|
|
int index = 0;
|
|
|
GObject star = _ui.target.GetChild(string.Format("comStar{0}_{1}_{2}", _ui.m_ctrlBuyType.selectedIndex, _ui.m_ctrlRewardsType.selectedIndex, index));
|
|
|
|
|
|
-
|
|
|
while (star != null && star.visible == true)
|
|
|
{
|
|
|
UI_ComStar comStar = UI_ComStar.Proxy(star);
|
|
@@ -179,12 +178,8 @@ namespace GFGGame
|
|
|
else
|
|
|
{
|
|
|
gcom = UIPackage.CreateObject("LuckyBox", "ComHolder").asCom;
|
|
|
- EffectUI _effectUI1 = EffectUIPool.CreateEffectUI(gcom.GetChild("holder").asGraph, "ui_LuckyBox", name);
|
|
|
- if (!dicEffect.ContainsKey(index))
|
|
|
- {
|
|
|
- dicEffect.Add(index, new List<EffectUI>());
|
|
|
- }
|
|
|
- dicEffect[index].Add(_effectUI1);
|
|
|
+ EffectUI _effectUI = EffectUIPool.CreateEffectUI(gcom.GetChild("holder").asGraph, "ui_LuckyBox", name);
|
|
|
+ dicEffect.Add(_effectUI);
|
|
|
}
|
|
|
return gcom;
|
|
|
}
|
|
@@ -225,7 +220,6 @@ namespace GFGGame
|
|
|
// comStar.target.GetChildAt(1).asCom.visible = false;
|
|
|
string resPath = _isLuckyBox ? "LINE_Bule" : "LINE";
|
|
|
EffectUI _effectUI = EffectUIPool.CreateEffectUI(comStar.m_comLine.m_holder, "ui_LuckyBox", resPath);
|
|
|
-
|
|
|
effObj.Add(_effectUI);
|
|
|
UI_ComStar.ProxyEnd();
|
|
|
|