| | |
| | | [SerializeField] List<ImageEx> freeGrays;
|
| | | [SerializeField] List<ImageEx> freeLocks;
|
| | | [SerializeField] List<ImageEx> freeHaves;
|
| | | [SerializeField] List<RotationTween> freeItemCellTweenList = new List<RotationTween>();
|
| | |
|
| | | //itemCellExs paidGrays paidLocks paidHaves 个数需要相等
|
| | | [SerializeField] List<ItemCell> itemCellExs;
|
| | |
| | | [SerializeField] Button reSignBtn; |
| | | [SerializeField] Text waitSignText;
|
| | | [SerializeField] Button btnLateSign;
|
| | | [SerializeField] List<RotationTween> paidItemCellTweenList = new List<RotationTween>();
|
| | | int dayNum = 0;
|
| | |
|
| | | VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } } |
| | | FairyAffinityLoginActModel model { get { return ModelCenter.Instance.GetModel<FairyAffinityLoginActModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | model.PlayAnimationSync += OnPlaySyncAnimation;
|
| | | if (dayNum == 0)
|
| | | return;
|
| | | for (int i = 0; i < freeItemCellTweenList.Count; i++)
|
| | | {
|
| | | freeItemCellTweenList[i].Stop();
|
| | | freeItemCellTweenList[i].SetStartState();
|
| | | }
|
| | | for (int i = 0; i < paidItemCellTweenList.Count; i++)
|
| | | {
|
| | | paidItemCellTweenList[i].Stop();
|
| | | paidItemCellTweenList[i].SetStartState();
|
| | | }
|
| | | //0 不可领取(日期未到) 1 可领取 2 已领取 3补签(已过天) 4 继续签到(已购买) 5 继续签到(未购买)
|
| | | int state = model.GetLoginAwardState(dayNum);
|
| | | for (int i = 0; i < freeItemCellTweenList.Count; i++)
|
| | | {
|
| | | if (state == 1)
|
| | | {
|
| | | freeItemCellTweenList[i].Play();
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < paidItemCellTweenList.Count; i++)
|
| | | {
|
| | | if (state == 4)
|
| | | {
|
| | | paidItemCellTweenList[i].Play();
|
| | | }
|
| | | }
|
| | | }
|
| | | private void OnDisable()
|
| | | {
|
| | | model.PlayAnimationSync -= OnPlaySyncAnimation;
|
| | | }
|
| | | public void Display(int index) |
| | | { |
| | | OperationLoginAct holiday; |
| | |
| | | paidHaves[i].SetActive(false); |
| | | } |
| | | }
|
| | | OnPlaySyncAnimation();
|
| | | } |
| | | private void OnPlaySyncAnimation()
|
| | | {
|
| | | for (int i = 0; i < freeItemCellTweenList.Count; i++)
|
| | | {
|
| | | freeItemCellTweenList[i].Stop();
|
| | | freeItemCellTweenList[i].SetStartState();
|
| | | }
|
| | | for (int i = 0; i < paidItemCellTweenList.Count; i++)
|
| | | {
|
| | | paidItemCellTweenList[i].Stop();
|
| | | paidItemCellTweenList[i].SetStartState();
|
| | | }
|
| | |
|
| | | //0 不可领取(日期未到) 1 可领取 2 已领取 3补签(已过天) 4 继续签到(已购买) 5 继续签到(未购买)
|
| | | int state = model.GetLoginAwardState(dayNum);
|
| | | for (int i = 0; i < freeItemCellTweenList.Count; i++)
|
| | | {
|
| | | if (freeItemCellTweenList[i].isActiveAndEnabled && state == 1)
|
| | | {
|
| | | freeItemCellTweenList[i].Play();
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < paidItemCellTweenList.Count; i++)
|
| | | {
|
| | | if (paidItemCellTweenList[i].isActiveAndEnabled && state == 4)
|
| | | {
|
| | | paidItemCellTweenList[i].Play();
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | |
|
| | | } |