part_particles_create

此函数非常适合那些不需要 粒子发射器 提供的任何函数 (例如,通过导弹产生烟雾或简单的爆炸效果) 的效果,因为它允许您在游戏室的任何位置快速轻松地创建粒子。请注意,必须先创建粒子系统和粒子类型,然后才能使用此函数。

 

语法:

part_particles_create(ind, x, y, parttype, number);

参数类型描述
indParticle System Instance粒子系统的索引。
xReal创建粒子的位置的x坐标。
yReal创建粒子的位置的y坐标。
parttypeParticle Type ID要创建的粒子的索引(类型)。
numberReal要创建的粒子数。

 

返回:

N/A

 

例子:

if (mouse_check_button(mb_left))
{
    part_particles_create(sname, mouse_x, mouse_y, p_CursorEffect, 5);
}

上述代码检查是否按下鼠标按钮,如果返回true,则会在鼠标位置生成5个粒子。