-
unity 序列帧动画之宝箱开启动画
-
using UnityEngine; using System.Collections; using UnityEngine.UI; using System.Collections.Generic; public class LoadingUIPanel : UIBase { [SerializeField] private Image image; [SerializeField] public List<Sprite> animationSprite = new List<Sprite>(); private GameObject Obj; private void Start() { Obj = this.gameObject.transform.Find("gai").gameObject; image = Obj.GetComponent<Image>(); PlayAnimation(); } private int AnimationAmount { get { return animationSprite.Count; } } public void PlayAnimation() { StartCoroutine(PlayAnimationForwardIEum()); } private IEnumerator PlayAnimationForwardIEum() { int index = 0; gameObject.SetActive(true); for(int i = 0;i<AnimationAmount -1;i++) {
unity 序列帧动画之宝箱开启动画
最新推荐文章于 2022-07-06 06:15:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)