72 lines
2.3 KiB
C#
72 lines
2.3 KiB
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class EffectItem : MonoBehaviour {
|
|||
|
|
|||
|
#region
|
|||
|
public GameObject markIcon; //点击标记
|
|||
|
public Text itemName;
|
|||
|
public Text itemDesc;
|
|||
|
public Text dressDesc;
|
|||
|
#endregion
|
|||
|
|
|||
|
private int curClassType;
|
|||
|
public int auraId;
|
|||
|
public int curIndex = -1;
|
|||
|
private Tab_AuraConfig auraConfig = null;
|
|||
|
public void InitItem(int auraConfigId, int classId, int index)
|
|||
|
{
|
|||
|
curIndex = index;
|
|||
|
curClassType = classId;
|
|||
|
auraId = auraConfigId;
|
|||
|
auraConfig = TableManager.GetAuraConfigByID(auraConfigId, 0);
|
|||
|
if(auraConfig != null)
|
|||
|
{
|
|||
|
if(GameManager.gameManager.PlayerDataPool.PlerfaFashiuonDataCtr.CurOwnEffectInfo.ContainsKey(auraId))
|
|||
|
{
|
|||
|
if(GameManager.gameManager.PlayerDataPool.PlerfaFashiuonDataCtr.CurOwnEffectInfo[auraId] == 0)
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42605}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42606}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42607}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
|
|||
|
itemDesc.text = auraConfig.AuraDesc;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void RefreshItemNameDesc()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.PlerfaFashiuonDataCtr.CurOwnEffectInfo.ContainsKey(auraId))
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.PlerfaFashiuonDataCtr.CurOwnEffectInfo[auraId] == 0)
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42605}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42606}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
itemName.text = StrDictionary.GetClientDictionaryString("#{42607}", auraConfig.AuraName);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnToggleClick()
|
|||
|
{
|
|||
|
EffectPanel.Instance.SetEffectId(curClassType, auraId, curIndex);
|
|||
|
}
|
|||
|
|
|||
|
}
|