43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class FireWorkItem : UIItemBase {
|
|||
|
|
|||
|
public Image _ItemIcon;
|
|||
|
public Text _ItemName;
|
|||
|
public Text _ItemDesc;
|
|||
|
public Text _ItemCostVal;
|
|||
|
public GameObject _ItemMarkIcon;
|
|||
|
|
|||
|
public int _TabId = -1;
|
|||
|
public override void Show(Hashtable hash)
|
|||
|
{
|
|||
|
base.Show(hash);
|
|||
|
_TabId = (int)hash["InitObj"];
|
|||
|
|
|||
|
var fireWorkTab = TableManager.GetWeddingFireworksByID(_TabId, 0);
|
|||
|
if (fireWorkTab == null)
|
|||
|
return;
|
|||
|
|
|||
|
LoadAssetBundle.Instance.SetImageSprite(_ItemIcon, fireWorkTab.FireIconPath);
|
|||
|
_ItemName.text = fireWorkTab.FireName;
|
|||
|
_ItemDesc.text = fireWorkTab.FireDesc;
|
|||
|
_ItemCostVal.text = fireWorkTab.CostVal + GCGame.Utils.GetMoneyName(fireWorkTab.CostSubClassType);
|
|||
|
}
|
|||
|
|
|||
|
public override void OnItemClick()
|
|||
|
{
|
|||
|
base.OnItemClick();
|
|||
|
if (BanQuetFireWorkPanel.Instance)
|
|||
|
BanQuetFireWorkPanel.Instance.OnItemClick(_TabId);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowMarkIcon(bool isShow)
|
|||
|
{
|
|||
|
_ItemMarkIcon.SetActive(isShow);
|
|||
|
}
|
|||
|
}
|