|
@@ -23,8 +23,7 @@ namespace GFGGame
|
|
|
private List<CardStarCfg> _cardStarRewards = new List<CardStarCfg>();
|
|
|
private int _selectTab = 0;
|
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
|
- private GameObject _cardObj;
|
|
|
- private GoWrapper _wrapper;
|
|
|
+ private EffectUI _effectUI;
|
|
|
|
|
|
private GObject _consumeSelectItem;//选中的材料item
|
|
|
private int _consumeSelectIndex = 0;//0为减,1为加
|
|
@@ -59,7 +58,8 @@ namespace GFGGame
|
|
|
_valueBarController.Dispose();
|
|
|
_valueBarController = null;
|
|
|
}
|
|
|
- SceneController.DestroyObjectFromView(_cardObj, _wrapper);
|
|
|
+ EffectUIPool.Recycle(_effectUI);
|
|
|
+ _effectUI = null;
|
|
|
|
|
|
if (_ui != null)
|
|
|
{
|
|
@@ -228,19 +228,20 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdateCardRes()
|
|
|
{
|
|
|
-
|
|
|
- if (_cardObj != null)
|
|
|
+ if (_effectUI != null)
|
|
|
{
|
|
|
- GameObject.Destroy(_cardObj);
|
|
|
- _cardObj = null;
|
|
|
+ EffectUIPool.Recycle(_effectUI);
|
|
|
+ _effectUI = null;
|
|
|
}
|
|
|
+ string resName = _cardData.resources[_cardData.resIndex];
|
|
|
string resPath = ResPathUtil.GetCardAnimationPath(_cardData.resources[_cardData.resIndex]);
|
|
|
if (_cardData.itemCfg.animationCardStar > 0 && _cardData.star >= _cardData.itemCfg.animationCardStar && Versions.Contains(resPath))
|
|
|
{
|
|
|
- SceneController.AddObjectToView(_cardObj, _wrapper, _ui.m_comCard.m_comCardHolder.m_holder, resPath, out _cardObj, out _wrapper);
|
|
|
+ _effectUI = new EffectUI();
|
|
|
+ _effectUI.Reset(_ui.m_comCard.m_comCardHolder.m_holder, resName, resName, 100, EffectUIType.Card);
|
|
|
}
|
|
|
|
|
|
- if (_cardObj != null)
|
|
|
+ if (_effectUI != null)
|
|
|
{
|
|
|
_ui.m_c1.selectedIndex = 1;
|
|
|
_ui.m_comCard.target.scrollPane.SetPercX(0.5f, false);
|