Ends the definition of a particle group and creates it in the room.



返回: Real(实数)


This function ends the definition of a particle group (which you should have begun using the function physics_particle_group_begin()), which in turn creates all the particles for the group within the game room. This function returns a unique ID value for the group just created which you can then store in a variable and use in other funtions.


var flags = phy_particle_flag_water | phy_particle_flag_viscous | phy_particle_flag_tensile;
var groupflags = phy_particle_group_flag_solid;
physics_particle_group_begin(flags, groupflags, mouse_x, mouse_y, 0, 0, 0, 0, c_white, 1, 1, 2);
mLastGroup = physics_particle_group_end();

The above code stores the flags for the particle type and the particle group properties in variables then uses these to create a circular particle group with a 100px radius at the mouse position. The ID for the group that has been created is stored in the variable "mLastGroup".

上一页: Soft Body Particles
下一页: physics_particle_group_join
© Copyright YoYo Games Ltd. 2018 All Rights Reserved