skeleton_animation_get_frame(track);
参数 描述 track The animation track to get the frame of.
整数
This function will return the frame number of the animation on the specified animation track. The function will return -1 if no animation is assigned to the specific track given.
重要!该函数在试用版(Trial License)产品中不可用。
var frame = skeleton_animation_get_frame(0);
if frame > 0 && frame < 2
{
var box = skeleton_get_minmax();
var ww = (box[2] - box[0]) / 2;
var hh = (box[3] - box[1]) / 2;
part_particles_create(global.p_sys, box[0] + ww, box[1] + hh, global.Stars, 10);
}
The above code will check the current frame of the animation assigned to track 0 and then burst some particles from a point in the middle of the total bounding box for the sprite.