| | |
| | |
|
| | | void DisplayFuncs()
|
| | | {
|
| | | var list = tipData.operates;
|
| | | var operates = tipData.operates;
|
| | | var index = 0;
|
| | | foreach (var type in list)
|
| | | if (operates != null)
|
| | | {
|
| | | var callBackType = type;
|
| | | if (index < m_Funcs.Length)
|
| | | foreach (var type in operates)
|
| | | {
|
| | | m_Funcs[index].gameObject.SetActive(true);
|
| | | m_Funcs[index].RemoveAllListeners();
|
| | | m_Funcs[index].AddListener(() =>
|
| | | var callBackType = type;
|
| | | if (index < m_Funcs.Length)
|
| | | {
|
| | | ItemTipUtility.GatherSoulOperate(callBackType);
|
| | | //if (list[callBackType] != null)
|
| | | //{
|
| | | // list[callBackType](callBackType, string.Empty);
|
| | | //}
|
| | | });
|
| | | m_FuncBtnDisplays[index].text = Language.Get(StringUtility.Contact("ItemHandle_", callBackType));
|
| | | m_Redpoints[index].gameObject.SetActive(false);
|
| | | m_Funcs[index].gameObject.SetActive(true);
|
| | | m_Funcs[index].RemoveAllListeners();
|
| | | m_Funcs[index].AddListener(() =>
|
| | | {
|
| | | ItemTipUtility.GatherSoulOperate(callBackType);
|
| | | });
|
| | | m_FuncBtnDisplays[index].text = Language.Get(StringUtility.Contact("ItemHandle_", callBackType));
|
| | | m_Redpoints[index].gameObject.SetActive(false);
|
| | |
|
| | | if (callBackType == ItemOperateType.LevelUp)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && tipData.gatherSoul.packType == PackType.InterimPack
|
| | | && model.levelUpRedpointHole == tipData.gatherSoul.index);
|
| | | if (callBackType == ItemOperateType.LevelUp)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && tipData.gatherSoul.packType == PackType.InterimPack
|
| | | && model.levelUpRedpointHole == tipData.gatherSoul.index);
|
| | | }
|
| | | else if (callBackType == ItemOperateType.Replace)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.replaceRedpoint.state == RedPointState.Simple
|
| | | && tipData.gatherSoul.packType == PackType.GatherSoul
|
| | | && tipData.gatherSoul.index == model.replaceRedpointIndex);
|
| | | }
|
| | | }
|
| | | else if (callBackType == ItemOperateType.Replace)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.replaceRedpoint.state == RedPointState.Simple
|
| | | && tipData.gatherSoul.packType == PackType.GatherSoul
|
| | | && tipData.gatherSoul.index == model.replaceRedpointIndex);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_Funcs.Length; i++)
|
| | | {
|