using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Interfaces
{
public interface IAnimationState
{
///
/// 事件方法签名
///
///
public delegate void TrackEntryDelegate(ITrackEntry trackEntry);
///
/// Start 事件
///
public event TrackEntryDelegate? Start;
///
/// Interrupt 事件
///
public event TrackEntryDelegate? Interrupt;
///
/// End 事件
///
public event TrackEntryDelegate? End;
///
/// Complete 事件
///
public event TrackEntryDelegate? Complete;
///
/// Dispose 事件
///
public event TrackEntryDelegate? Dispose;
///
/// 速度因子
///
public float TimeScale { get; set; }
///
/// 遍历所有的轨道, 可能存在 null
///
public IEnumerable IterTracks();
///
/// 更新时间
///
public void Update(float delta);
///
/// 将动画应用到骨骼上
///
public void Apply(ISkeleton skeleton);
///
/// 获取指定轨道当前播放条目, 可能返回 null
///
public ITrackEntry? GetCurrent(int index);
///
/// 清除指定轨道
///
public void ClearTrack(int index);
///
/// 清除所有轨道
///
public void ClearTracks();
///
/// 使用动画名设置轨道动画
///
public ITrackEntry SetAnimation(int trackIndex, string animationName, bool loop);
///
/// 使用动画对象设置轨道动画
///
public ITrackEntry SetAnimation(int trackIndex, IAnimation animation, bool loop);
///
/// 设置轨道空动画
///
public ITrackEntry SetEmptyAnimation(int trackIndex, float mixDuration);
///
/// 设置所有轨道空动画
///
public void SetEmptyAnimations(float mixDuration);
///
/// 在指定轨道后添加动画
///
public ITrackEntry AddAnimation(int trackIndex, string animationName, bool loop, float delay);
///
/// 在指定轨道后添加动画
///
public ITrackEntry AddAnimation(int trackIndex, IAnimation animation, bool loop, float delay);
///
/// 在指定轨道后添加空动画
///
public ITrackEntry AddEmptyAnimation(int trackIndex, float mixDuration, float delay);
}
}