|
@@ -15,7 +15,6 @@ namespace GFGGame
|
|
|
private Action onSuccess = null;
|
|
|
|
|
|
private List<EffectUI> _effects = new List<EffectUI>();
|
|
|
- // private List<GoWrapper> _wrappers = new List<GoWrapper>();
|
|
|
|
|
|
private const int maxHeight = 1030;
|
|
|
|
|
@@ -23,19 +22,6 @@ namespace GFGGame
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
- EffectUIPool.Recycle(_effectUI1);
|
|
|
- _effectUI1 = null;
|
|
|
-
|
|
|
- for (int i = 0; i < _effects.Count; i++)
|
|
|
- {
|
|
|
- if (_effects[i] != null)
|
|
|
- {
|
|
|
- EffectUIPool.Recycle(_effects[i]);
|
|
|
- _effects[i] = null;
|
|
|
- }
|
|
|
- }
|
|
|
- _effects.Clear();
|
|
|
-
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -52,12 +38,12 @@ namespace GFGGame
|
|
|
this.viewCom = _ui.target;
|
|
|
this.viewCom.Center();
|
|
|
this.modal = true;
|
|
|
+ viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
|
|
|
|
|
|
- _ui.m_comListReward.m_listReward.SetVirtual();
|
|
|
- _ui.m_comListReward.m_listReward.itemRenderer = RenderListRewardItem;
|
|
|
- // _ui.m_comListReward.m_listReward.onClickItem.Add(OnClickListReward);
|
|
|
+ _ui.m_listReward.SetVirtual();
|
|
|
+ _ui.m_listReward.itemRenderer = RenderListRewardItem;
|
|
|
|
|
|
- _ui.m_loaBg.onClick.Add(this.Hide);
|
|
|
+ this.viewCom.onClick.Add(this.Hide);
|
|
|
}
|
|
|
protected override void OnShown()
|
|
|
{
|
|
@@ -87,22 +73,32 @@ namespace GFGGame
|
|
|
}
|
|
|
_listItemDatas.AddRange(suitPart);
|
|
|
|
|
|
- _ui.m_comListReward.m_listReward.numItems = _listItemDatas.Count;
|
|
|
+ _ui.m_listReward.numItems = _listItemDatas.Count;
|
|
|
|
|
|
- _ui.m_comListReward.m_listReward.ResizeToFit();
|
|
|
- if (_ui.m_comListReward.m_listReward.height > maxHeight)
|
|
|
+ _ui.m_listReward.ResizeToFit();
|
|
|
+ if (_ui.m_listReward.height > maxHeight)
|
|
|
{
|
|
|
- _ui.m_comListReward.m_listReward.height = maxHeight;
|
|
|
+ _ui.m_listReward.height = maxHeight;
|
|
|
}
|
|
|
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gxhd_bjbj");
|
|
|
-
|
|
|
-
|
|
|
//邊框左上角特效
|
|
|
_effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderTitle, "ui_hd", "GXHD");
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
|
{
|
|
|
+ EffectUIPool.Recycle(_effectUI1);
|
|
|
+ _effectUI1 = null;
|
|
|
+
|
|
|
+ for (int i = 0; i < _effects.Count; i++)
|
|
|
+ {
|
|
|
+ if (_effects[i] != null)
|
|
|
+ {
|
|
|
+ EffectUIPool.Recycle(_effects[i]);
|
|
|
+ _effects[i] = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _effects.Clear();
|
|
|
+
|
|
|
if (onSuccess != null)
|
|
|
{
|
|
|
onSuccess();
|
|
@@ -141,14 +137,11 @@ namespace GFGGame
|
|
|
|
|
|
item.m_comRewardItem.m_imgOnceBonus.visible = _listItemDatas[index].isOnceBonus;
|
|
|
//特效("ui_ck", "ui_ck_zl");
|
|
|
- int childIndex = _ui.m_comListReward.m_listReward.ItemIndexToChildIndex(index);
|
|
|
+ int childIndex = _ui.m_listReward.ItemIndexToChildIndex(index);
|
|
|
if (_effects.Count <= childIndex)
|
|
|
{
|
|
|
- //EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holderReware, "ui_hd", "GXHD_WuPin");
|
|
|
- //_effects.Add(_effectUI);
|
|
|
-
|
|
|
- //_effects.Add(item.m_effect);
|
|
|
- //item.m_effect.SetPlaySettings(0, -1, 1, -1);
|
|
|
+ EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holderReware, "ui_hd", "GXHD_WuPin");
|
|
|
+ _effects.Add(_effectUI);
|
|
|
}
|
|
|
|
|
|
if (item.m_comRewardItem.target.data == null)
|