|
@@ -18,14 +18,21 @@ namespace GFGGame
|
|
|
private int _skillId = 0;
|
|
|
|
|
|
private List<EffectUI> _effects = new List<EffectUI>();
|
|
|
- private EffectUI _effectUI1;
|
|
|
private GComponent _comSelected;
|
|
|
|
|
|
+ private EffectUI _effectUI1;
|
|
|
+ private EffectUI _effectUI2;
|
|
|
+
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
base.Dispose();
|
|
|
- //EffectUIPool.Recycle(_effectUI1);
|
|
|
- //_effectUI1 = null;
|
|
|
+ EffectUIPool.Recycle(_effectUI1);
|
|
|
+ _effectUI1 = null;
|
|
|
+ EffectUIPool.Recycle(_effectUI2);
|
|
|
+ _effectUI2 = null;
|
|
|
+
|
|
|
+ //EffectUIPool.Recycle(_effectUI3);
|
|
|
+ //_effectUI3 = null;
|
|
|
if (_comSelected != null)
|
|
|
{
|
|
|
_comSelected.RemoveFromParent();
|
|
@@ -66,7 +73,8 @@ namespace GFGGame
|
|
|
_ui.m_btnUpCard.onClick.Add(OnBtnUpCardClikc);
|
|
|
|
|
|
_comSelected = UIPackage.CreateObject(UI_MainUI.PACKAGE_NAME, "ComCardSelect").asCom;
|
|
|
- //_effectUI1 = EffectUIPool.CreateEffectUI(_comSelected.GetChild("holder").asGraph, "ui_fight_new", "kp_Select");
|
|
|
+ //_effectUI3 = EffectUIPool.CreateEffectUI(_comSelected.GetChild("holder").asGraph, "ui_fight_new", "kp_Select");
|
|
|
+ AddEffect();
|
|
|
}
|
|
|
|
|
|
protected override void OnShown()
|
|
@@ -115,6 +123,7 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateView(int index)
|
|
|
{
|
|
|
+
|
|
|
// CardData cardData = cardList[index];
|
|
|
_ui.m_loaScore.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + _scoreType);
|
|
|
|
|
@@ -188,7 +197,15 @@ namespace GFGGame
|
|
|
item.m_loaMainScore.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (cardData.itemCfg.mainScore));
|
|
|
item.m_loaBorder.url = "ui://CommonGame/kp_kuang_" + cardData.itemCfg.rarity;
|
|
|
// UI_ComStar comStar = UI_ComStar.Proxy(item.m_comStar);
|
|
|
- item.m_txtStarLv.text = cardData.star.ToString();
|
|
|
+
|
|
|
+ int starLevelDodge = cardData.star / 5;
|
|
|
+ for (int i = 0; i < 4; i++)
|
|
|
+ {
|
|
|
+ UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(item.target.GetChild("dodgeStar" + i));
|
|
|
+ dodgeStar.m_lightType.selectedIndex = (starLevelDodge > i) ? 1 : 0;
|
|
|
+ UI_ComDodgeStar.ProxyEnd();
|
|
|
+ }
|
|
|
+
|
|
|
// comStar.m_c1.selectedIndex = cardData.star;
|
|
|
if (_effects.Count <= index)
|
|
|
{
|
|
@@ -286,5 +303,13 @@ namespace GFGGame
|
|
|
GuideController.TryGuide(_ui.m_listCard, ConstGuideId.SKILL_CARD_FIGHT, 2, "选择一张合适的词牌,增加过关战斗力。", 0);
|
|
|
GuideController.TryCompleteGuide(ConstGuideId.SKILL_CARD_FIGHT, 2);
|
|
|
}
|
|
|
+ private void AddEffect()
|
|
|
+ {
|
|
|
+ //邊框左上角特效
|
|
|
+ _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
|
|
|
+
|
|
|
+ //邊框右下角特效
|
|
|
+ _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
|
|
|
+ }
|
|
|
}
|
|
|
}
|