备份CatanBuilding瘦身独立工程
This commit is contained in:
36
Assets/Scripts/UI/Shop/GiftPopupPanel_10.cs
Normal file
36
Assets/Scripts/UI/Shop/GiftPopupPanel_10.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using asap.core;
|
||||
using cfg;
|
||||
using GameCore;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GiftPopupPanel_10 : MonoBehaviour
|
||||
{
|
||||
GiftPopupPanel_10_sub root_3rewards;
|
||||
GiftPopupPanel_10_sub root_4rewards;
|
||||
private void Awake()
|
||||
{
|
||||
root_3rewards = transform.Find("root/root_3rewards").GetComponent<GiftPopupPanel_10_sub>();
|
||||
root_4rewards = transform.Find("root/root_4rewards").GetComponent<GiftPopupPanel_10_sub>();
|
||||
FishingEventData fishingEventData = GContext.container.Resolve<FishingEventData>();
|
||||
int index = fishingEventData.GetPack1A1Index();
|
||||
if (index >= 2)
|
||||
{
|
||||
UIManager.Instance.DestroyUI(UITypes.GiftPopupPanel_10);
|
||||
return;
|
||||
}
|
||||
EventPackManager eventPackDataRead = fishingEventData.Get1A1EventPackManager();
|
||||
if (eventPackDataRead == null)
|
||||
{
|
||||
UIManager.Instance.DestroyUI(UITypes.GiftPopupPanel_10);
|
||||
return;
|
||||
}
|
||||
List<int> vipPackIds = eventPackDataRead.VIPPackList[fishingEventData.Pack1A1Data.vipLevel];
|
||||
var _tables = GContext.container.Resolve<Tables>();
|
||||
var pack1 = _tables.TbPack.GetOrDefault(vipPackIds[0]);
|
||||
var itemData1 = GContext.container.Resolve<PlayerItemData>().GetItemDataByDropId(pack1.DropID);
|
||||
root_3rewards.gameObject.SetActive(itemData1.Count <= 3);
|
||||
root_4rewards.gameObject.SetActive(itemData1.Count > 3);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user