Skip to content

TweenPlayState

概览

字段
KindEnum · 枚举 Enum
Realmcommon
  • Inherit: Int
  • 继承链: Int → TweenPlayState

TweenPlayState 枚举定义 Tween.PlaybackState 属性可能返回的播放阶段,包括 Begin、Delayed、Playing、Paused、Completed 和 Cancelled。

适用场景

在需要轮询或读取补间动画当前阶段时,访问 tween.PlaybackState,并与 Enums.TweenPlayState.Playing、Paused、Completed 等成员比较。

使用要点

通过 TweenService:Create 创建 Tween 后,读取 tween.PlaybackState 判断播放阶段;Tween.Completed 事件的回调参数表示终止原因,使用 Enums.TweenStatus 判断。

注意事项

TweenPlayState 用于 PlaybackState 属性;Tween.Completed 事件回调参数使用 TweenStatus。枚举值必须通过 Enums.TweenPlayState 命名空间访问,禁止使用数字代替。

枚举值

名称说明
0Begin初始状态,尚未播放
1Delayed等待延迟时间结束
2Playing正在插值中
3Paused已暂停
4Completed已完成所有循环
5Cancelled已被取消