52 lines
1.1 KiB
C#
52 lines
1.1 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class PrivilegeShowPanelCtr : MonoBehaviour {
|
|||
|
|
|||
|
public static PrivilegeShowPanelCtr Instance;
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
Instance = this;
|
|||
|
}
|
|||
|
|
|||
|
private void OnDestroy()
|
|||
|
{
|
|||
|
Instance = null;
|
|||
|
}
|
|||
|
|
|||
|
#region
|
|||
|
public List<PrivilegeVipItem> itemList;
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
ReqPrivilegeVipInfo();
|
|||
|
}
|
|||
|
|
|||
|
public void ReqPrivilegeVipInfo()
|
|||
|
{
|
|||
|
ReqVipInfo req = new ReqVipInfo();
|
|||
|
req._NodeId = 0;
|
|||
|
req.SendMsg();
|
|||
|
}
|
|||
|
|
|||
|
public void OnPacket(RetPrivilegeVipInfo packet)
|
|||
|
{
|
|||
|
for (int index = 0; index < itemList.Count; index++)
|
|||
|
{
|
|||
|
for(int packetIndex = 0; packetIndex < packet._PrivilegeVip.Count; packetIndex++)
|
|||
|
{
|
|||
|
if((int)itemList[index]._CurType == packet._PrivilegeVip[packetIndex]._PrivilegeType)
|
|||
|
{
|
|||
|
itemList[index].OnPacket(packet._PrivilegeVip[packetIndex]);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|