|
1
|
if (!init && image_index >= 2)
|
|
2
|
{
|
|
3
|
if (!silent)
|
|
4
|
snd_play_pitch(snd_explosion_firework, 1.1 + random(0.4));
|
|
5
|
init = 1;
|
|
6
|
if (!reflected)
|
|
7
|
{
|
|
8
|
hitboxA = instance_create(x + 50, y + 88, obj_susiezilla_enemy_hitbox);
|
|
9
|
hitboxA.knockback = -1;
|
|
10
|
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;
} (hitboxA);
|
|
11
|
hitboxA.timer = 5;
|
|
12
|
hitboxA.damage = 30;
|
|
13
|
}
|
|
14
|
hitboxB = instance_create(x + 50, y + 88, obj_susiezilla_player_hitbox);
|
|
15
|
hitboxB.knockback = -1;
|
|
16
|
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;
} (hitboxB);
|
|
17
|
hitboxB.timer = 5;
|
|
18
|
hitboxB.damage = 30;
|
|
19
|
}
|
|
20
|
if (init == 1 && image_index >= 5)
|
|
21
|
{
|
|
22
|
if (instance_exists(hitboxA))
|
|
23
|
instance_destroy(hitboxA);
|
|
24
|
if (instance_exists(hitboxB))
|
|
25
|
instance_destroy(hitboxB);
|
|
26
|
init = 2;
|
|
27
|
}
|