备份CatanBuilding瘦身独立工程
This commit is contained in:
26
Assets/Scripts/UI/Advert/AdvertTicketPanel.cs
Normal file
26
Assets/Scripts/UI/Advert/AdvertTicketPanel.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using asap.core;
|
||||
using cfg;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class AdvertTicketPanel : MonoBehaviour
|
||||
{
|
||||
AdvertShopSlot[] advertShopSlot;
|
||||
private void Awake()
|
||||
{
|
||||
advertShopSlot = GetComponentsInChildren<AdvertShopSlot>();
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
var shopTokens = GContext.container.Resolve<Tables>().TbShopToken.DataList;
|
||||
var advertShopTokens = shopTokens.Where(x => x.Type == 6).ToArray();
|
||||
for (int i = 0; i < advertShopTokens.Length; i++)
|
||||
{
|
||||
if (i == advertShopSlot.Length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
advertShopSlot[i].SetData(advertShopTokens[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user