SpriteSequence QML Type

绘制精灵动画。更多

Import Statement: import QtQuick
Inherits:

Item

属性

方法

详细说明

SpriteSequence 可渲染和控制由Sprite 类型定义的动画列表。

详情请参阅 "雪碧动画"概述。

另请参阅 SpriteSequence 中的雪花动画

属性文档

currentSprite : string [read-only]

当前正在播放动画的Sprite 的名称。


goalSprite : string

动画应移动到的Sprite 的名称。

设置goalSprite 后,动画将不考虑任何路径权重(包括0 ),而是沿着最快(动画最少)到达goalSprite 的路径前进。它将通过该路径上的中间状态,并在这些状态的持续时间内制作动画。

如果可以从goalSprite 的起点返回goalSprite ,它将继续这样做,直到goalSprite 设置为"" 或不可到达的状态。


interpolate : bool

如果true ,则会在精灵帧之间进行插值,使动画看起来更平滑。

默认值为true


running : bool

精灵是否正在动画。

默认为true


sprites : list<Sprite> [read-only]

要绘制的一个或多个精灵。精灵将缩放为该项目的大小。


方法文档

jumpTo(string sprite)

此函数将使SpriteSequence 立即跳转到指定的sprite ;中间的精灵不会播放。


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.