您可以使用AnimationState.TimeScale修改播放速度,或将其设置为0.0来暂停播放。您也可以通过完全禁用组件来禁用对“ SkeletonAnimation”的更新,这也可以实现暂停(或冻结)效果。
You can use AnimationState.TimeScale to modify playback speed, or pause by setting it to 0.0. You can also disable updates to SkeletonAnimation
by disabling the component completely, this also achieves a pause (or freeze) effect.
您可以使用SkeletonAnimation.AnimationState.GetCurrent(0)来获取当前正在播放的TrackEntry在第一个轨道上。调用AddAnimation()或`SetAnimation'时,您还会获得“ TrackEntry”作为返回值。
You can use SkeletonAnimation.AnimationState.GetCurrent(0) to get the currently playing TrackEntry on the first track. You also get a TrackEntry as return value when calling AddAnimation() or SetAnimation
.
这个“ TrackEntry”可以看作是播放器中当前正在播放的歌曲,以及一些获取或更改位置的控件等。
然后,您可以查询当前的TrackEntry.AnimationTime。
This TrackEntry can be seen as the currently playing song in a player, plus some controls to get or change position, etc.
You can then query the current TrackEntry.AnimationTime.