Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if children == 0 exit;
- for (var i = 0; i < children; i += 1)
- {
- if instance_exists(child[i])
- {
- var ang = image_angle;
- var xsc = image_xscale;
- var ysc = image_yscale;
- var xp = round(x);
- var yp = round(y);
- var img_alpha = image_alpha;
- var vis = visible;
- var l_off = sprite_get_xoffset(sprite_index);
- var r_off = sprite_get_width(sprite_index) - l_off;
- var t_off = sprite_get_yoffset(sprite_index);
- var b_off = sprite_get_height(sprite_index) - t_off;
- with child[i]
- {
- var spr = sprite_index;
- if !sprite_exists(spr) spr = mask_index;
- var c_l_off = sprite_get_xoffset(spr);
- var c_r_off = sprite_get_width(spr) - c_l_off;
- var c_t_off = sprite_get_yoffset(spr);
- var c_b_off = sprite_get_height(spr) - c_t_off;
- visible = vis;
- if !update_angle ang = 0;
- if !update_scale {xsc = 1; ysc = 1;}
- if update_coords
- {
- var xadd, yadd;
- xadd = x_add;
- yadd = y_add;
- if halign == fa_right xadd = x_add + r_off - c_r_off;
- else if halign == fa_left xadd = x_add - l_off + c_l_off;
- if valign == fa_top yadd = y_add - t_off + c_t_off;
- else if valign == fa_bottom yadd = y_add + b_off - c_b_off;
- dir = point_direction(0, 0, xadd, yadd);
- dis = point_distance(0, 0, xadd/abs(parent.xscale_start), yadd/abs(parent.yscale_start));
- x = xp + round( lengthdir_x(dis * xsc, ang + dir) ) + x_offset;
- y = yp + round( lengthdir_y(dis * ysc, ang + dir) ) + y_offset;
- }
- if update_alpha image_alpha = img_alpha * alpha;
- if update_scale
- {
- image_xscale = xsc * xscale;
- image_yscale = ysc * yscale;
- }
- if update_angle image_angle = ang + angle;
- }
- }
- else child_remove(i);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement