27 lines
691 B
C#
27 lines
691 B
C#
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]);
|
|
}
|
|
}
|
|
}
|