|
@@ -13,9 +13,15 @@ namespace GFGGame
|
|
|
private List<CardData> cardList = new List<CardData>();
|
|
|
private static int _scoreType;
|
|
|
|
|
|
+ private List<GameObject> _effects = new List<GameObject>();
|
|
|
+ private List<GoWrapper> _wrappers = new List<GoWrapper>();
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
base.Dispose();
|
|
|
+ for (int i = 0; i < _effects.Count; i++)
|
|
|
+ {
|
|
|
+ SceneController.DestroyObjectFromView(_effects[i]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
protected override void OnInit()
|
|
@@ -66,14 +72,27 @@ namespace GFGGame
|
|
|
private void RenderListCardItem(int index, GObject obj)
|
|
|
{
|
|
|
CardData cardData = cardList[index];
|
|
|
- GButton item = obj as GButton;
|
|
|
- item.GetChild("txtName").asTextField.text = cardData.itemCfg.name;
|
|
|
- item.GetChild("comCardMask").asCom.GetChild("loaCard").asLoader.url = ResPathUtil.GetCardSmallPath(cardData.resources[cardData.resIndex]);
|
|
|
- item.GetChild("txtLv").asTextField.text = string.Format("Lv.\n{0}", cardData.lv);
|
|
|
- item.GetChild("loaRarity").asLoader.url = ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + cardData.itemCfg.rarity);
|
|
|
- UI_ComStar comStar = UI_ComStar.Proxy(item.GetChild("comStar").asCom);
|
|
|
+ UI_ListCardItem item = UI_ListCardItem.Proxy(obj);// obj as GButton;
|
|
|
+ // item.GetChild("txtName").asTextField.text = cardData.itemCfg.name;
|
|
|
+ // item.GetChild("comCardMask").asCom.GetChild("loaCard").asLoader.url = ResPathUtil.GetCardSmallPath(cardData.resources[cardData.resIndex]);
|
|
|
+ // item.GetChild("txtLv").asTextField.text = string.Format("Lv.\n{0}", cardData.lv);
|
|
|
+ // item.GetChild("loaRarity").asLoader.url = ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + cardData.itemCfg.rarity);
|
|
|
+ // UI_ComStar comStar = UI_ComStar.Proxy(item.GetChild("comStar").asCom);
|
|
|
+ // comStar.m_c1.selectedIndex = cardData.star;
|
|
|
+ item.m_txtName.text = cardData.itemCfg.name;
|
|
|
+ item.m_comCardMask.m_loaCard.asLoader.url = ResPathUtil.GetCardSmallPath(cardData.resources[cardData.resIndex]);
|
|
|
+ item.m_txtLv.text = string.Format("Lv.\n{0}", cardData.lv);
|
|
|
+ item.m_loaRarity.url = ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + cardData.itemCfg.rarity);
|
|
|
+ UI_ComStar comStar = UI_ComStar.Proxy(item.m_comStar);
|
|
|
comStar.m_c1.selectedIndex = cardData.star;
|
|
|
-
|
|
|
+ if (_effects.Count <= index)
|
|
|
+ {
|
|
|
+ string resPath = ResPathUtil.GetViewEffectPath("ui_xz", "ui_xz_zd_kq");
|
|
|
+ GameObject gameObject0;
|
|
|
+ GoWrapper wrapper0;
|
|
|
+ SceneController.AddObjectToView(null, null, item.m_holder, resPath, out gameObject0, out wrapper0);
|
|
|
+ _effects.Add(gameObject0);
|
|
|
+ }
|
|
|
}
|
|
|
private void OnListCardItemClick(EventContext context)
|
|
|
{
|