Files
JJBB/Assets/Project/Script/GUI/Welfare/RedPacketRebeatPanelCtr.cs
2024-08-23 15:49:34 +08:00

58 lines
1.4 KiB
C#

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using GCGame.Table;
public class RedPacketRebeatPanelCtr :MonoBehaviour{
public OperationActivityEnterfaceId _ActEnterFaceId;
public UIContainerBase _AwardContainer;
private int _ActId = 72; //入口ID2 活动ID70
public void OnEnable()
{
ReqInfo();
}
public void ReqInfo()
{
MarketingRedPacketReq packet = new MarketingRedPacketReq();
packet.actId = _ActId;
packet.SendMsg();
}
public List<Text> _DescList;
public virtual void MarketingActAwardPageRet(MarketingRedPacketRet packet)
{
SetDescs(packet.descLists);
_AwardContainer.InitContentItem(packet.awardTag);
}
public void SetDescs(List<string> descLists)
{
for(int index = 0; index < _DescList.Count; index++)
{
_DescList[index].gameObject.SetActive(index < _DescList.Count);
}
for(int index = 0; index < descLists.Count && index < _DescList.Count; index++)
{
_DescList[index].text = StrDictionary.GetServerDictionaryFormatString(descLists[index]);
}
}
public void OnCloseBtnClick()
{
gameObject.SetActive(false);
}
public virtual void OnDisable()
{
if (MarketingActsRoot.Instance())
{
MarketingActsRoot.Instance().ClearShowingWin((int)_ActEnterFaceId);
}
}
}