using System; using asap.core; using GameCore; using TMPro; using UnityEngine; using UnityEngine.UI; using cfg; using game; using UniRx; using System.Collections.Generic; public class ThanksGivingChainSlot : MonoBehaviour { private RewardItemNew _token; private RewardItemNew[] _rewards; private TMP_Text _textPrice; private Button _btnBuy; private GameObject _goLock, _goDone; private Animation _animationPlayButton; private IChainPackData _data; private PlayerItemData _playerItemData; private Pack _packData; private List _rewardItemDataList; /// /// Position of the Slot, in zigzag snake style. /// private int _slotIndex; private IAPItemList _iap; private IEventAggregator _eventAggregator; private GameObject[] _bgGos; public IDisposable RewardPanelCallbackSubscription; private List _progressRewardDropList; private CanvasGroup _canvasGroupSelected; private const string ChangeKey = "buy_change", IdleKey = "buy_normal", DoneKey = "buy_done"; private bool IsThisSlotLocked { get { int finaleChainIdx = _data.ChainListCount - ThanksGivingPackData.SlotCount; if (_data.ChainProgress >= finaleChainIdx) // Entering the ending stage { return _slotIndex > _data.ChainProgress - finaleChainIdx; } return _slotIndex == 0; } } public void Init(int slotIdx, IChainPackData packData, IEventAggregator ea) { _btnBuy = transform.Find("Item/btn_buy/btn_green").GetComponent