857 lines
41 KiB
C#
857 lines
41 KiB
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
using Games.Item;
|
|||
|
using Games.LogicObj;
|
|||
|
using Module.Log;
|
|||
|
|
|||
|
public class AdvanceFashionPanelCtr : MonoBehaviour {
|
|||
|
|
|||
|
public void InitMenuItemName()
|
|||
|
{
|
|||
|
switch (AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
case AdvanceBase.AdvanceType.Ride:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42667}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42667}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42667}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42667}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Wing:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42669}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42669}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42669}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42669}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Piano:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42668}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42668}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42668}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42668}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Qilinbi:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42670}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42670}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42670}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42670}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Soul:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42709}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42709}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42709}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42709}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Mask:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42710}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42710}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42710}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42710}");
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Huopao:
|
|||
|
menuItemName[0].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42711}");
|
|||
|
menuItemName[1].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42711}");
|
|||
|
menuItemName[2].text = StrDictionary.GetClientDictionaryString("#{43010}") + StrDictionary.GetClientDictionaryString("#{42711}");
|
|||
|
menuItemName[3].text = StrDictionary.GetClientDictionaryString("#{43012}") + StrDictionary.GetClientDictionaryString("#{42711}");
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public static AdvanceFashionPanelCtr Instance;
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
Instance = this;
|
|||
|
}
|
|||
|
|
|||
|
private void OnDestroy()
|
|||
|
{
|
|||
|
Instance = null;
|
|||
|
}
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
InitMenuItemName();
|
|||
|
IsCanDragCameraTeture();
|
|||
|
StartCoroutine(GetAllTypeIdList());
|
|||
|
}
|
|||
|
|
|||
|
public void IsCanDragCameraTeture()
|
|||
|
{
|
|||
|
cameraTexture._CanDrag = AdvanceMountPanelCtr.Instance.m_AdvanceType == AdvanceBase.AdvanceType.Ride || AdvanceMountPanelCtr.Instance.m_AdvanceType == AdvanceBase.AdvanceType.Wing;
|
|||
|
}
|
|||
|
|
|||
|
public int isShowIndex = -1;
|
|||
|
public void ShowDefaultFirst()
|
|||
|
{
|
|||
|
if (isShowIndex == -1)
|
|||
|
{
|
|||
|
OnToggleClick(0);
|
|||
|
|
|||
|
}else
|
|||
|
{
|
|||
|
OnToggleClick(isShowIndex);
|
|||
|
}
|
|||
|
isShowIndex = -1;
|
|||
|
}
|
|||
|
|
|||
|
public void ReqAdvancdFashionInfo()
|
|||
|
{
|
|||
|
CG_REQ_ADVANCE req = (CG_REQ_ADVANCE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_ADVANCE);
|
|||
|
req.SetType((int)AdvanceMountPanelCtr.Instance.m_AdvanceType);
|
|||
|
req.SetOptionType((int)AdvanceBase.ReqType.REQ_INFO);
|
|||
|
req.SetParam1(1);
|
|||
|
req.SetParam2(0);
|
|||
|
req.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
private List<GameObject> advanceItemPrefabList = new List<GameObject>();
|
|||
|
private List<GameObject> fashionItemPrefabList = new List<GameObject>();
|
|||
|
private void CreateItemPrefab()
|
|||
|
{
|
|||
|
//当前帧只初始化一个
|
|||
|
if (curTypeGradeBaseIdList.Count > 0)
|
|||
|
{
|
|||
|
GameObject item = GameObject.Instantiate(itemprefab);
|
|||
|
item.transform.SetParent(prefabParent);
|
|||
|
item.transform.localPosition = Vector3.zero;
|
|||
|
item.transform.localScale = Vector3.one;
|
|||
|
item.transform.localRotation = Quaternion.Euler(Vector3.zero);
|
|||
|
advanceItemPrefabList.Add(item);
|
|||
|
advanceItemPrefabList[0].GetComponent<AdvanceFashionItem>().InitItem(curTypeGradeBaseIdList[0], (int)AdvanceFashionType.Advance, 0);
|
|||
|
}
|
|||
|
if (curTypeGradeBaseIdList.Count > 1)
|
|||
|
{
|
|||
|
StartCoroutine(CreateItemCoroutine());
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
IEnumerator CreateItemCoroutine()
|
|||
|
{
|
|||
|
yield return new WaitForEndOfFrame();
|
|||
|
for (int index = 1; index < curTypeGradeBaseIdList.Count; index++)
|
|||
|
{
|
|||
|
GameObject item = GameObject.Instantiate(itemprefab);
|
|||
|
item.transform.SetParent(prefabParent);
|
|||
|
item.transform.localPosition = Vector3.zero;
|
|||
|
item.transform.localScale = Vector3.one;
|
|||
|
item.transform.localRotation = Quaternion.Euler(Vector3.zero);
|
|||
|
|
|||
|
advanceItemPrefabList.Add(item);
|
|||
|
advanceItemPrefabList[index].GetComponent<AdvanceFashionItem>().InitItem(curTypeGradeBaseIdList[index], (int)AdvanceFashionType.Advance, index);
|
|||
|
}
|
|||
|
|
|||
|
for (int index = 0; index < curTypeFashionIdList.Count; index++)
|
|||
|
{
|
|||
|
GameObject item = GameObject.Instantiate(itemprefab);
|
|||
|
item.transform.SetParent(prefabParent);
|
|||
|
item.transform.localPosition = Vector3.zero;
|
|||
|
item.transform.localScale = Vector3.one;
|
|||
|
item.transform.localRotation = Quaternion.Euler(Vector3.zero);
|
|||
|
|
|||
|
fashionItemPrefabList.Add(item);
|
|||
|
fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().InitItem(curTypeFashionIdList[index], (int)AdvanceFashionType.Fashion, index);
|
|||
|
}
|
|||
|
|
|||
|
RefreshAdvanceItemState();
|
|||
|
ShowDefaultFirst();
|
|||
|
yield break;
|
|||
|
}
|
|||
|
|
|||
|
#region
|
|||
|
public GameObject itemprefab;
|
|||
|
public Transform prefabParent;
|
|||
|
|
|||
|
public List<Image> menuItemMarkIconList;
|
|||
|
public List<Text> menuItemName;
|
|||
|
|
|||
|
public Text gradeText;
|
|||
|
public Text modelName;
|
|||
|
public UICameraTexture cameraTexture;
|
|||
|
|
|||
|
public GameObject namePanel;
|
|||
|
public GameObject attrPanel;
|
|||
|
public Text _MoveDesc;
|
|||
|
|
|||
|
public List<Text> attrNameList;
|
|||
|
public List<Text> attrValueTetx;
|
|||
|
|
|||
|
public Text combatValue;
|
|||
|
|
|||
|
public Button usingBtn;
|
|||
|
public Text usingBtnDesc;
|
|||
|
|
|||
|
public GameObject remainTimePanel;
|
|||
|
public Text remainTimeDesc;
|
|||
|
|
|||
|
public Text gainPath;
|
|||
|
|
|||
|
public GameObject _FashionMenuItem;
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
public enum AdvanceFashionType
|
|||
|
{
|
|||
|
Advance = 0, //正常进阶获得
|
|||
|
Fashion = 1, //活动获得
|
|||
|
}
|
|||
|
|
|||
|
public void OnToggleClick(int _Index)
|
|||
|
{
|
|||
|
namePanel.SetActive(_Index == 0 ? true : false);
|
|||
|
attrPanel.SetActive(_Index == 1 ? true : false);
|
|||
|
|
|||
|
for(int index = 0; index < menuItemMarkIconList.Count; index++)
|
|||
|
{
|
|||
|
menuItemMarkIconList[index].gameObject.SetActive(index == _Index ? true : false);
|
|||
|
}
|
|||
|
|
|||
|
StartCoroutine(ShowTypeItem(_Index));
|
|||
|
}
|
|||
|
private List<int> curTypeGradeBaseIdList = new List<int>();
|
|||
|
private List<int> curTypeFashionIdList = new List<int>();
|
|||
|
private Dictionary<int, List<Tab_AdvanceBase>> baseDic;
|
|||
|
private Dictionary<int, List<Tab_AdvanceFashion>> fashionDic;
|
|||
|
IEnumerator ShowTypeItem(int _Index)
|
|||
|
{
|
|||
|
switch (_Index)
|
|||
|
{
|
|||
|
case (int)AdvanceFashionType.Advance:
|
|||
|
for (int index = 0; index < advanceItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
advanceItemPrefabList[index].SetActive(true);
|
|||
|
}
|
|||
|
for (int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
fashionItemPrefabList[index].SetActive(false);
|
|||
|
}
|
|||
|
//点击前刷新状态
|
|||
|
RefreshAdvanceItemState();
|
|||
|
|
|||
|
if (advanceItemPrefabList.Count > 0)
|
|||
|
{
|
|||
|
advanceItemPrefabList[0].GetComponent<AdvanceFashionItem>().OnItemClick();
|
|||
|
}
|
|||
|
break;
|
|||
|
default:
|
|||
|
ReqAdvancdFashionInfo();
|
|||
|
for (int index = 0; index < advanceItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
advanceItemPrefabList[index].SetActive(false);
|
|||
|
}
|
|||
|
for (int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
fashionItemPrefabList[index].SetActive(true);
|
|||
|
}
|
|||
|
RefreshAdvanceItemState();
|
|||
|
if (fashionItemPrefabList.Count > 0)
|
|||
|
fashionItemPrefabList[0].GetComponent<AdvanceFashionItem>().OnItemClick();
|
|||
|
break;
|
|||
|
}
|
|||
|
yield break;
|
|||
|
}
|
|||
|
|
|||
|
IEnumerator GetAllTypeIdList()
|
|||
|
{
|
|||
|
yield return new WaitForEndOfFrame();
|
|||
|
if(curTypeGradeBaseIdList.Count != 0)
|
|||
|
{
|
|||
|
ShowDefaultFirst();
|
|||
|
yield break;
|
|||
|
}else
|
|||
|
{
|
|||
|
var baseDic = TableManager.GetAdvanceBase().Values;
|
|||
|
foreach (var baseInfo in baseDic)
|
|||
|
{
|
|||
|
if ((baseInfo.Id - baseInfo.Level) / 1000 - 1 == (int)AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
bool hasFind = false;
|
|||
|
for (int index = 0; index < curTypeGradeBaseIdList.Count; index++)
|
|||
|
{
|
|||
|
Tab_AdvanceBase advanBase = TableManager.GetAdvanceBaseByID(curTypeGradeBaseIdList[index], 0);
|
|||
|
if (advanBase == null)
|
|||
|
{
|
|||
|
yield break;
|
|||
|
}
|
|||
|
if (advanBase.Grade == baseInfo.Grade)
|
|||
|
{
|
|||
|
hasFind = true;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
if (!hasFind)
|
|||
|
{
|
|||
|
curTypeGradeBaseIdList.Add(baseInfo.Id);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
var fashionDic = TableManager.GetAdvanceFashion().Values;
|
|||
|
foreach (var fashionInfo in fashionDic)
|
|||
|
{
|
|||
|
if (fashionInfo.Type == (int)AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
curTypeFashionIdList.Add(fashionInfo.Id);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
IsNeedHideFashionMenuitem();
|
|||
|
CreateItemPrefab();
|
|||
|
yield break;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
//如果时装为0,需要隐藏按钮
|
|||
|
private void IsNeedHideFashionMenuitem()
|
|||
|
{
|
|||
|
_FashionMenuItem.SetActive(curTypeFashionIdList.Count > 0);
|
|||
|
}
|
|||
|
|
|||
|
//刷新进阶状态以及活动时装是否佩戴,收到协议返回再处理
|
|||
|
public void RefreshAdvanceItemState()
|
|||
|
{
|
|||
|
for (int itemIndex = 0; itemIndex < advanceItemPrefabList.Count; itemIndex++)
|
|||
|
{
|
|||
|
Tab_AdvanceBase advanceBase = TableManager.GetAdvanceBaseByID(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId, 0);
|
|||
|
if (advanceBase == null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
switch (AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
case AdvanceBase.AdvanceType.Ride:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.RideGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.m_objMountParam.AutoFlagMountID
|
|||
|
&& GameManager.gameManager.PlayerDataPool.m_objMountParam.AutoFlagMountID != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Wing:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.WingGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWingId) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Piano:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.GodWeaponGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceGodweaponId) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Qilinbi:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.WishGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWishId) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Soul:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.SealGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceSealId) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Mask:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.MaskGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceMaskId) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Huopao:
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(advanceBase.Grade <= GameManager.gameManager.PlayerDataPool.m_AdvanceData.CrownGrade ? true : false);
|
|||
|
advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(advanceItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceCrownId) ? true : false);
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
for(int itemIndex = 0; itemIndex < fashionItemPrefabList.Count; itemIndex++)
|
|||
|
{
|
|||
|
switch (AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
case AdvanceBase.AdvanceType.Ride:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
( fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.m_objMountParam.AutoFlagMountID
|
|||
|
&& GameManager.gameManager.PlayerDataPool.m_objMountParam.AutoFlagMountID != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Wing:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWingId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWingId != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Piano:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
( fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceGodweaponId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceGodweaponId != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Qilinbi:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWishId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceWishId != -1)? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Mask:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceMaskId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceMaskId != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Soul:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceSealId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceSealId != -1) ? true : false);
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Huopao:
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowUsingIcon(
|
|||
|
(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceCrownId
|
|||
|
&& GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.AdvanceSealId != -1) ? true : false);
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
if ((GameManager.gameManager.PlayerDataPool.m_AdvanceData.m_AdvanceFashionDic.ContainsKey(fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId)
|
|||
|
&& GameManager.gameManager.PlayerDataPool.m_AdvanceData.m_AdvanceFashionDic[fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId] >= 0))
|
|||
|
{
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(true);
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().SetRemainTime(GameManager.gameManager.PlayerDataPool.m_AdvanceData.m_AdvanceFashionDic[fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId]);
|
|||
|
}else
|
|||
|
{
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(false);
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().SetRemainTime(-1);
|
|||
|
}
|
|||
|
}
|
|||
|
RefreshDressBtnState();
|
|||
|
}
|
|||
|
|
|||
|
public void RefreshDressBtnState()
|
|||
|
{
|
|||
|
//刷新幻化Item状态
|
|||
|
|
|||
|
for (int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
if (fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().advanceFashionId == lastModelId)
|
|||
|
{
|
|||
|
fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().OnItemClick();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
for (int index = 0; index < advanceItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
if (advanceItemPrefabList[index].GetComponent<AdvanceFashionItem>().advanceFashionId == lastModelId)
|
|||
|
{
|
|||
|
advanceItemPrefabList[index].GetComponent<AdvanceFashionItem>().OnItemClick();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//活动相关时装在收到返回协议的时候刷新是否激活的状态
|
|||
|
public void ReceiveAdvanceFashionPacket(GC_ADVANCE_FASHION_INFO packet)
|
|||
|
{
|
|||
|
//时装状态
|
|||
|
for (int itemIndex = 0; itemIndex < fashionItemPrefabList.Count; itemIndex++)
|
|||
|
{
|
|||
|
bool hasFind = false;
|
|||
|
for (int index = 0; index < packet.infoCount; index++)
|
|||
|
{
|
|||
|
if (fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId != -1
|
|||
|
&& fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().advanceFashionId == packet.GetInfo(index).Id
|
|||
|
&& packet.GetInfo(index).Time >= 0)
|
|||
|
{
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().SetRemainTime(packet.GetInfo(index).Time);
|
|||
|
hasFind = true;
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(true);
|
|||
|
}
|
|||
|
}
|
|||
|
if(!hasFind)
|
|||
|
{
|
|||
|
fashionItemPrefabList[itemIndex].GetComponent<AdvanceFashionItem>().ShowActiviteIcon(false);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//刷新(使用中/幻化)状态
|
|||
|
for(int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
if(fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().advanceFashionId == lastModelId)
|
|||
|
{
|
|||
|
fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().OnItemClick();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private int lastModelId = -1;
|
|||
|
|
|||
|
public void OnItemClick(int _Id, int _Type)
|
|||
|
{
|
|||
|
if(gameObject.activeInHierarchy)
|
|||
|
{
|
|||
|
StartCoroutine(OnAdvanceFashionItemClick(_Id, _Type));
|
|||
|
}
|
|||
|
}
|
|||
|
public GameObject DoubleRideSign;//双骑相关
|
|||
|
public GameObject L_DoubleMountBtn;
|
|||
|
IEnumerator OnAdvanceFashionItemClick(int id, int type)
|
|||
|
{
|
|||
|
yield return new WaitForEndOfFrame();
|
|||
|
lastModelId = id;
|
|||
|
|
|||
|
//双骑标记----------------------------------------------------------
|
|||
|
Tab_AdvanceFashion m_advanceFashion = TableManager.GetAdvanceFashionByID(id, 0);
|
|||
|
L_DoubleMountBtn = FunctionButtonLogic.Instance().DoubleMountBtnBg;
|
|||
|
if (m_advanceFashion != null)
|
|||
|
{
|
|||
|
Tab_MountBase mountBases = TableManager.GetMountBaseByID(m_advanceFashion.ModelId, 0);
|
|||
|
if (DoubleRideSign)
|
|||
|
DoubleRideSign.gameObject.SetActive(mountBases != null ? mountBases.DoubleRiding == 1 : false); //判断双人坐骑
|
|||
|
if (L_DoubleMountBtn)
|
|||
|
{
|
|||
|
L_DoubleMountBtn.gameObject.SetActive(mountBases != null ? mountBases.DoubleRiding == 1 : false); //判断双人坐骑
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
DoubleRideSign.gameObject.SetActive(false);
|
|||
|
L_DoubleMountBtn.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
//------------------------------------------------------------------
|
|||
|
|
|||
|
switch (type)
|
|||
|
{
|
|||
|
case (int)AdvanceFashionType.Advance:
|
|||
|
{
|
|||
|
attrPanel.SetActive(false);
|
|||
|
Tab_AdvanceBase advanceBase = TableManager.GetAdvanceBaseByID(id, 0);
|
|||
|
if (advanceBase == null)
|
|||
|
{
|
|||
|
yield break;
|
|||
|
}
|
|||
|
gainPath.text = StrDictionary.GetClientDictionaryString("#{44038}", advanceBase.GainPath);
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
switch (AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
case AdvanceBase.AdvanceType.Ride:
|
|||
|
{
|
|||
|
Tab_MountBase mountBase = TableManager.GetMountBaseByID(advanceBase.ModelId, 0);
|
|||
|
if (mountBase == null)
|
|||
|
{
|
|||
|
yield break;
|
|||
|
}
|
|||
|
Tab_CharMount charMount = TableManager.GetCharMountByID(mountBase.ModelID, 0);
|
|||
|
if (charMount == null)
|
|||
|
{
|
|||
|
yield break;
|
|||
|
}
|
|||
|
cameraTexture.InitMountModelPath(charMount);
|
|||
|
modelName.text = mountBase.Name;
|
|||
|
gradeText.text = GCGame.Utils.GetGradeString(advanceBase.Grade);
|
|||
|
}
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Wing:
|
|||
|
{
|
|||
|
cameraTexture.InitWingModelPath(advanceBase);
|
|||
|
gradeText.text = GCGame.Utils.GetGradeString(advanceBase.Grade);
|
|||
|
modelName.text = advanceBase.Name;
|
|||
|
}
|
|||
|
break;
|
|||
|
default:
|
|||
|
{
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
Tab_CharModel charModel = TableManager.GetCharModelByID(advanceBase.ModelId, 0);
|
|||
|
if(charModel != null)
|
|||
|
{
|
|||
|
cameraTexture.InitModelPath(charModel.ResPath, charModel, LoadAssetBundle.BUNDLE_PATH_MODEL, true);
|
|||
|
}
|
|||
|
modelName.text = advanceBase.Name;
|
|||
|
gradeText.text = GCGame.Utils.GetGradeString(advanceBase.Grade);
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
default:
|
|||
|
{
|
|||
|
Tab_AdvanceFashion advanceFashion = TableManager.GetAdvanceFashionByID(id, 0);
|
|||
|
if (advanceFashion == null)
|
|||
|
{
|
|||
|
yield break; ;
|
|||
|
}
|
|||
|
gainPath.text = gainPath.text = StrDictionary.GetClientDictionaryString("#{44038}", advanceFashion.GainPath);
|
|||
|
|
|||
|
if(advanceFashion.GetAttrIdbyIndex(0) == -1)
|
|||
|
{
|
|||
|
attrPanel.SetActive(false);
|
|||
|
}else
|
|||
|
{
|
|||
|
attrPanel.SetActive(true);
|
|||
|
for (int index = 0; index < advanceFashion.getAttrIdCount(); index++)
|
|||
|
{
|
|||
|
if (advanceFashion.GetAttrIdbyIndex(index) != -1)
|
|||
|
{
|
|||
|
attrNameList[index].gameObject.SetActive(true);
|
|||
|
attrValueTetx[index].gameObject.SetActive(true);
|
|||
|
|
|||
|
int strId = advanceFashion.GetAttrIdbyIndex(index) + 10000;
|
|||
|
attrNameList[index].text = StrDictionary.GetClientDictionaryString("#{" + strId + "}") + ":";
|
|||
|
attrValueTetx[index].text = advanceFashion.GetAttrValuebyIndex(index).ToString();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
attrNameList[index].gameObject.SetActive(false);
|
|||
|
attrValueTetx[index].gameObject.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
combatValue.text = advanceFashion.CombatValue.ToString();
|
|||
|
}
|
|||
|
_MoveDesc.gameObject.SetActive(AdvanceMountPanelCtr.Instance.m_AdvanceType == AdvanceBase.AdvanceType.Ride);
|
|||
|
switch (AdvanceMountPanelCtr.Instance.m_AdvanceType)
|
|||
|
{
|
|||
|
case AdvanceBase.AdvanceType.Ride:
|
|||
|
{
|
|||
|
//刷新模型
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
//animationPanel.gameObject.SetActive(false);
|
|||
|
Tab_MountBase mountBase = TableManager.GetMountBaseByID(advanceFashion.ModelId, 0);
|
|||
|
if (mountBase == null)
|
|||
|
{
|
|||
|
yield break; ;
|
|||
|
}
|
|||
|
Tab_CharMount charMount = TableManager.GetCharMountByID(mountBase.ModelID, 0);
|
|||
|
if (charMount == null)
|
|||
|
{
|
|||
|
yield break; ;
|
|||
|
}
|
|||
|
_MoveDesc.text = StrDictionary.GetClientDictionaryString("#{3243}", mountBase.Speed - 100);
|
|||
|
cameraTexture.InitMountModelPath(charMount);
|
|||
|
modelName.text = mountBase.Name;
|
|||
|
}
|
|||
|
break;
|
|||
|
case AdvanceBase.AdvanceType.Wing:
|
|||
|
{
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
//animationPanel.gameObject.SetActive(false);
|
|||
|
var auraConfig = TableManager.GetAuraConfigByID(advanceFashion.ModelId, 0);
|
|||
|
if(auraConfig == null)
|
|||
|
{
|
|||
|
yield break;
|
|||
|
}
|
|||
|
|
|||
|
Tab_WeaponModel weapon = TableManager.GetWeaponModelByID(auraConfig.LiuShanWingModelId, 0);
|
|||
|
if(weapon == null)
|
|||
|
{
|
|||
|
LogModule.WarningLog("weapon is null");
|
|||
|
yield break;
|
|||
|
}
|
|||
|
cameraTexture.InitWingModelPath(null, weapon, delegate() {
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
});
|
|||
|
}
|
|||
|
break;
|
|||
|
default:
|
|||
|
{
|
|||
|
cameraTexture.gameObject.SetActive(true);
|
|||
|
Tab_CharModel charModel = TableManager.GetCharModelByID(advanceFashion.ModelId, 0);
|
|||
|
if(charModel != null)
|
|||
|
{
|
|||
|
cameraTexture.InitModelPath(charModel.ResPath, charModel);
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
yield break;
|
|||
|
}
|
|||
|
|
|||
|
public void SetFashionItemMarkIcon(int type, int _Index)
|
|||
|
{
|
|||
|
switch(type)
|
|||
|
{
|
|||
|
case (int)AdvanceFashionType.Advance:
|
|||
|
{
|
|||
|
for(int index = 0; index < advanceItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
advanceItemPrefabList[index].GetComponent<AdvanceFashionItem>().ShowMarkIcon(index == _Index ? true : false);
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
default:
|
|||
|
for (int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
fashionItemPrefabList[index].GetComponent<AdvanceFashionItem>().ShowMarkIcon(index == _Index ? true : false);
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private bool IsHavaFashionInBack(int type, int itemId)
|
|||
|
{
|
|||
|
GameItemContainer container = GameManager.gameManager.PlayerDataPool.BackPack;
|
|||
|
List<GameItem> backpackItems = ItemTool.ItemFilter(container, 0);
|
|||
|
if (container == null)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
foreach (var item in backpackItems)
|
|||
|
{
|
|||
|
if(item.GetClass() == (int)ItemClass.ADVANCEFASHION
|
|||
|
&& item.GetSubClass() == type
|
|||
|
&& item.DataID == itemId)
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
private bool canActivite = false;
|
|||
|
private bool showGetPath = false;
|
|||
|
private bool showDress = false;
|
|||
|
|
|||
|
private int activiteItemId = -1;
|
|||
|
private int pathId = -1;
|
|||
|
|
|||
|
readonly string _LockColor = "<color=#515053>{0}</color>";
|
|||
|
readonly string _UnLockColor = "<color=#745146>{0}</color>";
|
|||
|
public void InitUsingBtnState(bool isUsing, bool isOwn, int remainTime, int type, int itmeId, int getPathId)//剩余时间(0代表永久,-1代表删除)
|
|||
|
{
|
|||
|
pathId = getPathId;
|
|||
|
if (remainTime < 0)
|
|||
|
{
|
|||
|
remainTimePanel.SetActive(false);
|
|||
|
if (type == 0) //坐骑 正常进阶获取
|
|||
|
{
|
|||
|
usingBtn.interactable = false;
|
|||
|
usingBtnDesc.text = string.Format(_LockColor, StrDictionary.GetClientDictionaryString("#{43014}"));
|
|||
|
|
|||
|
canActivite = false;
|
|||
|
showDress = false;
|
|||
|
showGetPath = false;
|
|||
|
}
|
|||
|
else //时装 1.背包有对应道具显示激活 2.背包没有显示获取途径
|
|||
|
{
|
|||
|
remainTimeDesc.text = StrDictionary.GetClientDictionaryString("#{43016}"); //永久拥有
|
|||
|
if (getPathId != -1)
|
|||
|
usingBtn.interactable = true;
|
|||
|
else
|
|||
|
usingBtn.interactable = false;
|
|||
|
if (IsHavaFashionInBack(type, itmeId))
|
|||
|
{
|
|||
|
//显示为可激活
|
|||
|
usingBtnDesc.text = string.Format(_UnLockColor, StrDictionary.GetClientDictionaryString("#{42653}")); ;
|
|||
|
|
|||
|
canActivite = true;
|
|||
|
showGetPath = false;
|
|||
|
showDress = false;
|
|||
|
|
|||
|
activiteItemId = itmeId;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
//显示为获取途径
|
|||
|
usingBtnDesc.text = string.Format(_UnLockColor, StrDictionary.GetClientDictionaryString("#{42657}")); ;
|
|||
|
canActivite = false;
|
|||
|
showGetPath = true;
|
|||
|
showDress = false;
|
|||
|
}
|
|||
|
}
|
|||
|
}else if(remainTime == 0) //永久拥有
|
|||
|
{
|
|||
|
remainTimePanel.SetActive(true);
|
|||
|
if (isUsing) //使用中
|
|||
|
{
|
|||
|
canActivite = false;
|
|||
|
showDress = false;
|
|||
|
showGetPath = false;
|
|||
|
|
|||
|
remainTimePanel.SetActive(true);
|
|||
|
remainTimeDesc.text = StrDictionary.GetClientDictionaryString("#{43016}");
|
|||
|
|
|||
|
usingBtn.interactable = false;
|
|||
|
usingBtnDesc.text = string.Format(_LockColor, StrDictionary.GetClientDictionaryString("#{43013}"));
|
|||
|
}
|
|||
|
else //可以幻化
|
|||
|
{
|
|||
|
canActivite = false;
|
|||
|
showDress = true;
|
|||
|
showGetPath = false;
|
|||
|
|
|||
|
remainTimePanel.SetActive(true);
|
|||
|
remainTimeDesc.text = StrDictionary.GetClientDictionaryString("#{43016}");
|
|||
|
|
|||
|
usingBtn.interactable = true;
|
|||
|
usingBtnDesc.text = string.Format(_UnLockColor, StrDictionary.GetClientDictionaryString("#{43015}"));
|
|||
|
}
|
|||
|
}
|
|||
|
else //已激活
|
|||
|
{
|
|||
|
remainTimePanel.SetActive(true);
|
|||
|
int remainDay = remainTime / (3600 * 24);
|
|||
|
int remainHour = (remainTime - remainDay * 3600 * 24) / 3600;
|
|||
|
int remainSec = (remainTime - remainDay * 3600 * 24 - remainHour * 3600) / 60;
|
|||
|
remainTimeDesc.text = StrDictionary.GetClientDictionaryString("#{43017}", remainDay, remainHour, remainSec);
|
|||
|
|
|||
|
if (isUsing) //使用中
|
|||
|
{
|
|||
|
canActivite = false;
|
|||
|
showDress = false;
|
|||
|
showGetPath = false;
|
|||
|
|
|||
|
usingBtn.interactable = false;
|
|||
|
usingBtnDesc.text = string.Format(_LockColor, StrDictionary.GetClientDictionaryString("#{43013}"));
|
|||
|
}
|
|||
|
else //可以幻化
|
|||
|
{
|
|||
|
canActivite = false;
|
|||
|
showDress = true;
|
|||
|
showGetPath = false;
|
|||
|
|
|||
|
usingBtn.interactable = true;
|
|||
|
usingBtnDesc.text = string.Format(_UnLockColor, StrDictionary.GetClientDictionaryString("#{43015}"));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnUsingBtnClick()
|
|||
|
{
|
|||
|
if(showDress)
|
|||
|
{
|
|||
|
CG_REQ_ADVANCE req = (CG_REQ_ADVANCE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_ADVANCE);
|
|||
|
req.SetOptionType((int)AdvanceBase.ReqType.CHANGE_USEID);
|
|||
|
req.SetType((int)AdvanceMountPanelCtr.Instance.m_AdvanceType);
|
|||
|
req.SetParam1(lastModelId);
|
|||
|
req.SetParam2(-1);
|
|||
|
req.SendPacket();
|
|||
|
|
|||
|
}
|
|||
|
else if(canActivite)
|
|||
|
{
|
|||
|
//关闭当前的进阶界面
|
|||
|
UIManager.CloseUI(UIInfo.AdvanceMountPanel);
|
|||
|
//跳转到背包界面
|
|||
|
UIManager.ShowUI(UIInfo.BackPackRoot, delegate(bool bSucess, object param) {
|
|||
|
if(bSucess)
|
|||
|
{
|
|||
|
BackPackLogic.Instance()._TagPanel.ShowPage(0);
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
else if(showGetPath)
|
|||
|
{
|
|||
|
ItemTooltipsLogic.ShowItemTooltip(pathId, ItemTooltipsLogic.ShowType.GetPath, usingBtn.transform.position);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void OnDisable()
|
|||
|
{
|
|||
|
curTypeGradeBaseIdList.Clear();
|
|||
|
curTypeFashionIdList.Clear();
|
|||
|
for(int index = 0; index < advanceItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
GameObject.Destroy(advanceItemPrefabList[index]);
|
|||
|
}
|
|||
|
advanceItemPrefabList.Clear();
|
|||
|
|
|||
|
for(int index = 0; index < fashionItemPrefabList.Count; index++)
|
|||
|
{
|
|||
|
GameObject.Destroy(fashionItemPrefabList[index]);
|
|||
|
}
|
|||
|
fashionItemPrefabList.Clear();
|
|||
|
}
|
|||
|
}
|