效果1:从头播放到尾
效果2:重复播放
效果3:正放、倒放交替播放
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class XuLieZhen : MonoBehaviour
{
[Header("序列帧路径")]
public string Path;
[Header("更换间隔")]
public float time = 0.01f;
float delTime;
[Header("是否循环播放")]
bool IsLoop;
[Header("从第几张开始循环")]
public int LoopIndex;
[Header("来回效果,勾选isloop无效")]
bool IsPingPang;
int index = 0;
List<Sprite> sprites = new List<Sprite>();
bool IsPlay