37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Games.Item;
|
|
using UnityEngine.UI;
|
|
using Games.GlobeDefine;
|
|
|
|
// 进阶坐骑装备面板
|
|
// 增加对他人信息界面支持
|
|
public class AdvanceEquipPanel : MonoBehaviour {
|
|
|
|
public List<AdvanceEquipItem> equipItemList;
|
|
private GameItemContainer _ContainerPack;
|
|
|
|
/// <summary>
|
|
/// 初始化坐骑装备面板
|
|
/// </summary>
|
|
/// <param name="showType">指定显示哪方的数据:自己/他人?</param>
|
|
public void InitEquipItem(GameDefine_Globe.ShowType showType = GameDefine_Globe.ShowType.Self)
|
|
{
|
|
if(showType == GameDefine_Globe.ShowType.Self)
|
|
{
|
|
_ContainerPack = GameManager.gameManager.PlayerDataPool.AdvancePack;
|
|
}
|
|
else
|
|
{
|
|
_ContainerPack = GameManager.gameManager.OtherPlayerData.AdvancePack;
|
|
}
|
|
|
|
for (int index = 0; index < equipItemList.Count; index++)
|
|
{
|
|
GameItem item = _ContainerPack.GetItem((int)equipItemList[index].curAdvanceEquipSlotType);
|
|
equipItemList[index].InitEquipItem(item == null ? -1 : item.DataID);
|
|
}
|
|
}
|
|
}
|