|
1
|
function scr_hitbox_copy(arg0, arg1)
|
|
2
|
{
|
|
3
|
var __ww = arg0.bbox_right - arg0.bbox_left;
|
|
4
|
var __hh = arg0.bbox_bottom - arg0.bbox_top;
|
|
5
|
arg1.image_xscale = __ww / sprite_get_width(arg1.sprite_index);
|
|
6
|
arg1.image_yscale = __hh / sprite_get_height(arg1.sprite_index);
|
|
7
|
arg1.x = arg0.bbox_left + arg1.sprite_xoffset;
|
|
8
|
arg1.y = arg0.bbox_top + arg1.sprite_yoffset;
|
|
9
|
}
|
|
10
|
|
|
11
|
function scr_hitbox_copyto(arg0)
|
|
12
|
{
|
|
13
|
scr_hitbox_copy(self, arg0);
|
|
14
|
}
|
|
15
|
|
|
16
|
function scr_hitbox_copyfrom(arg0)
|
|
17
|
{
|
|
18
|
scr_hitbox_copy(arg0, self);
|
|
19
|
}
|
|
20
|
|
|
21
|
function scr_copy_hitboxscr_copy_hitbox
function scr_hitbox_copy(arg0, arg1)
{
var __ww = arg0.bbox_right - arg0.bbox_left;
var __hh = arg0.bbox_bottom - arg0.bbox_top;
arg1.image_xscale = __ww / sprite_get_width(arg1.sprite_index);
arg1.image_yscale = __hh / sprite_get_height(arg1.sprite_index);
arg1.x = arg0.bbox_left + arg1.sprite_xoffset;
arg1.y = arg0.bbox_top + arg1.sprite_yoffset;
}
function scr_hitbox_copyto(arg0)
{
scr_hitbox_copy(self, arg0);
}
function scr_hitbox_copyfrom(arg0)
{
scr_hitbox_copy(arg0, self);
}
function scr_copy_hitbox(arg0)
{
arg0.x = x;
arg0.y = y;
arg0.sprite_index = sprite_index;
arg0.visible = false;
arg0.image_xscale = image_xscale;
arg0.image_yscale = image_yscale;
arg0.image_angle = image_angle;
} (arg0)
|
|
22
|
{
|
|
23
|
arg0.x = x;
|
|
24
|
arg0.y = y;
|
|
25
|
arg0.sprite_index = sprite_index;
|
|
26
|
arg0.visible = false;
|
|
27
|
arg0.image_xscale = image_xscale;
|
|
28
|
arg0.image_yscale = image_yscale;
|
|
29
|
arg0.image_angle = image_angle;
|
|
30
|
}
|