设置粒子的精灵


描述

This action can be used to set the sprite that a particle can use when drawing. You supply the unique ID value for the type to set the sprite of (as returned when you created the type with the action Create Particle Type) and the sprite resource to use. If the sprite has sub-images, then the particle will animate through the frames at the speed set in the Image Editor for the sprite. Also note that if you set a colour value for the particle (using the Set Particle Colour action) then this colour will be blended with the sprite used, much like setting the image blend on an instance will blend a colour with the instance sprite (use white for no blending).

注意: If you use this action then you should not use the action Set Particle Shape as you can only have a sprite or a shape, but not both.


动作语法:

Create Particle Sprite Syntax


参数:

参数 描述
Type ID The ID value for the type to set the sprite of


例如:

Set Particle Sprite Example
The above action block code will create a new particle type and assign its unique ID value to a global variable. It then proceeds to set all the properties for the particle type.