part_system_update

Updates the positions of the particles in a given system.

语法:

part_system_update(ind);


参数 描述
ind The index of the particle system to update.


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


描述

This function will advance the given particle system one step in game time and can be used to simulate the particle system behaviour when automatic updating is off, or it can be used to advance a particle system to a specific point all in one step. For example, if you have a particle system for snow, and you want it to appear that the snow is falling right from the moment the player enters the room then you may wish to advance your snow particles for a few seconds in the create event of an instance so that the first time they are drawn, there are particles all over the screen (the code example below shows this). You can also use this function when automatic updating of the system is switched off by the function part_system_automatic_update to move the system along.


例如:

repeat (room_speed * 3)
   {
   part_system_update(global.RainSys);
   }

The above code will advance the particle system indexed in the global variable "RainSys" by 3 seconds.


上一页: Particle Systems
下一页: part_system_drawit
© Copyright YoYo Games Ltd. 2018 All Rights Reserved