| | |
| | | using DG.Tweening;
|
| | | using Spine.Unity;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using UnityEngine;
|
| | |
| | | [SerializeField] List<PositionTween> qianPositionTweens = new List<PositionTween>();
|
| | | [SerializeField] RotationTween qianTongRotationTween;
|
| | | [SerializeField] UIEffect qianTongUIEffect;
|
| | | [SerializeField] List<UIEffect> haveUIEffects;
|
| | | [SerializeField] List<SkeletonGraphic> haveSkeletonGraphics;
|
| | |
|
| | | [SerializeField] TextEx actTime;
|
| | | [SerializeField] ButtonEx btnXBOne;
|
| | |
| | | {
|
| | | qianTongUIEffect.Stop();
|
| | |
|
| | | for (int i = 0; i < haveUIEffects.Count; i++)
|
| | | for (int i = 0; i < haveSkeletonGraphics.Count; i++)
|
| | | {
|
| | | haveUIEffects[i].Stop();
|
| | | haveSkeletonGraphics[i].SetActive(false);
|
| | | haveSkeletonGraphics[i].AnimationState.ClearTracks();
|
| | | }
|
| | |
|
| | | for (int i = 0; i < yunShiXBItems.Count; i++)
|
| | |
| | | if (xbItemlist.Count == 1)
|
| | | {
|
| | | YunShiXBItem item = yunShiXBItems[0];
|
| | | yunShiXBItems[0].transform.position = haveUIEffects[0].transform.position;
|
| | | yunShiXBItems[0].transform.position = haveSkeletonGraphics[0].transform.position;
|
| | | Vector3 targetPosition = oneEnd.position;
|
| | | XBGetItem xbItem = happyXBModel.rangelist[0];
|
| | | DG.Tweening.Tween tween = item.transform.DOMove(targetPosition, 0.05f).SetDelay(0.05f).SetEase(Ease.InOutSine)
|
| | | .OnStart(() =>
|
| | | {
|
| | | haveUIEffects[0].Play();
|
| | | haveSkeletonGraphics[0].SetActive(true);
|
| | | haveSkeletonGraphics[0].Skeleton.SetToSetupPose();
|
| | | haveSkeletonGraphics[0].AnimationState.SetAnimation(0, "animation1", false);
|
| | | yunShiXBItems[0].Display(xbItem.itemId, xbItem.count);
|
| | | yunShiXBItems[0].SetActive(true);
|
| | | for (int i = 0; i < qianPositionTweens.Count; i++)
|
| | |
| | | {
|
| | | int index = i;
|
| | | YunShiXBItem item = yunShiXBItems[i];
|
| | | yunShiXBItems[i].transform.position = haveUIEffects[i].transform.position;
|
| | | yunShiXBItems[i].transform.position = haveSkeletonGraphics[i].transform.position;
|
| | | Vector3 targetPosition = manyEnds[i].position;
|
| | | XBGetItem xbItem = happyXBModel.rangelist[i];
|
| | | DG.Tweening.Tween tween = item.transform.DOMove(targetPosition, 0.1f).SetDelay(0.1f).SetEase(Ease.InOutSine)
|
| | | .OnStart(() =>
|
| | | {
|
| | | haveUIEffects[index].Play();
|
| | | haveSkeletonGraphics[index].SetActive(true);
|
| | | haveSkeletonGraphics[index].Skeleton.SetToSetupPose();
|
| | | haveSkeletonGraphics[index].AnimationState.SetAnimation(0, "animation1", false);
|
| | | yunShiXBItems[index].Display(xbItem.itemId, xbItem.count);
|
| | | yunShiXBItems[index].SetActive(true);
|
| | | for (int i = 0; i < qianPositionTweens.Count; i++)
|