纹理帧动画模块的脚本接口。
通过此模块可以向粒子纹理添加动画。这通过创作翻页纹理来实现,这些纹理类似于下面这样:
Each numbered region represents a frame of the animation, and must be distributed evenly across the texture.
Select a variable below to see script examples. You may want to use this texture on your Particle System with each example, to see how the module works.
另请参阅:ParticleSystem、ParticleSystem.textureSheetAnimation。
animation | 指定动画类型。 |
cycleCount | 指定动画在粒子生命周期内的循环次数。 |
enabled | 启用/禁用纹理帧动画模块。 |
fps | Control how quickly the animation plays. |
frameOverTime | 曲线,用于控制要播放的纹理帧动画的帧。 |
frameOverTimeMultiplier | 随时间变化的帧乘数。 |
mode | 选择动画纹理信息是来自单个纹理上的帧网格,还是来自精灵对象的列表。 |
numTilesX | 定义纹理在 X 轴上的平铺。 |
numTilesY | 定义纹理在 Y 轴上的平铺。 |
rowIndex | Explicitly select which row of the texture sheet is used, when ParticleSystem.TextureSheetAnimationModule.rowMode is set to Custom. |
speedRange | Specify how particle speeds are mapped to the animation frames. |
spriteCount | 精灵总数。 |
startFrame | 为纹理帧动画定义随机初始帧。 |
startFrameMultiplier | 初始帧乘数。 |
timeMode | Select whether the playback is based on mapping a curve to the lifetime of each particle, by using the particle speeds, or if playback simply uses a constant frames per second. |
useRandomRow | 对发射的每个粒子使用纹理帧的随机行。 |
uvChannelMask | 选择将接收纹理动画的 UV 通道。 |
AddSprite | 添加新精灵。 |
GetSprite | 获取指定索引处的精灵。 |
RemoveSprite | 从数组给定索引处删除精灵。 |
SetSprite | 设置给定索引处的精灵。 |