神岛 API 文档 - ArenaPro版
    Preparing search index...

    Class GameAnimation<KeyframeType, TargetType>

    游戏动画类,用于控制和管理动画播放。

    Game animation class for controlling and managing animation playback.

    Type Parameters

    • KeyframeType
    • TargetType
    Index

    Properties

    cancel: () => void

    取消当前动画播放。

    Cancels the current animation playback.

    currentTime: number

    动画的当前播放时间(以动画帧为单位)。

    The current playback time of the animation (in animation frames).

    keyframes: () => Partial<KeyframeType>[]

    返回所有动画关键帧。

    Returns all animation keyframes.

    获取下一个动画完成的事件。

    Gets the next animation finish event.

    获取下一个动画准备完成的事件。

    Gets the next animation ready event.

    当动画成功完成时触发。

    Triggered when the animation completes successfully.

    当动画开始时触发。

    Triggered when the animation starts.

    play: (playback?: Partial<GameAnimationPlaybackConfig>) => void

    Type declaration

    开始或重新开始播放动画。

    Starts or restarts animation playback.

    playbackRate: number

    播放速率(每刻度的帧数)

    playState: GameAnimationPlaybackState

    动画的当前播放状态

    startTime: number

    动画的开始刻度

    target: TargetType

    动画目标对象(可能是世界、玩家或实体)。

    Animation target object (could be world, player, or entity).