Files
JJBB/Assets/Project/Script/GUI/VIP/PrivilegeShowPanelCtr.cs

52 lines
1.1 KiB
C#
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
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]);
}
}
}
}
}