part_emitter_destroy

销毁位于指定粒子系统中的指定发射器。

语法:

part_emitter_destroy( ps, ind );


参数 描述
ps 待销毁发射器的粒子系统。
ind 待销毁的发射器索引。


返回: N/A(无返回值)


描述

This function will remove the specified emitter from the given system and clear it from memory (this will also stop any particles from being produced by the given emitter, but it does NOT remove them from the room). This function should always be called when the given emitter is no longer needed for the system to prevent memory leaks and errors.


例如:

if part_emitter_exists(global.Sname, p_emit)
   {
   part_emitter_destroy(global.Sname, p_emit1);
   }

The above code will check to see if the particle emitter indexed in the variable "p_emit" exists in the give particle system and if it does it is destroyed.


上一页:粒子
下一页:part_emitter_destroy_all
© Copyright YoYo Games Ltd. 2018 All Rights Reserved