|
1
|
var minx = (obj_growtangle.x - (obj_growtangle.sprite_width / 2)) + 5;
|
|
2
|
var maxx = obj_spamton_attack_mode.x + obj_spamton_attack_mode.mouthx;
|
|
3
|
if (timer > 0)
|
|
4
|
{
|
|
5
|
var timerscale = scr_ease_outscr_ease_out
function scr_ease_out(arg0, arg1)
{
if (arg1 < -3 || arg1 > 7)
return arg0;
switch (arg1)
{
case -3:
return ease_out_bounce(arg0, 0, 1, 1);
case -2:
return ease_out_elastic(arg0, 0, 1, 1);
case -1:
return ease_out_back(arg0, 0, 1, 1);
case 0:
return arg0;
case 1:
return sin(arg0 * 1.5707963267948966);
case 2:
return -arg0 * (arg0 - 2);
case 6:
return -power(2, -10 * arg0) + 1;
case 7:
arg0--;
return sqrt(1 - (arg0 * arg0));
default:
arg0--;
if (arg1 == 4)
{
return -1 * (power(arg0, arg1) - 1);
break;
}
return power(arg0, arg1) + 1;
}
} (1 - (abs(timer - 5) / 5), 7);
|
|
6
|
var ypoint = obj_growtangle.y + (((obj_growtangle.sprite_height / 2) - 4) * flip);
|
|
7
|
ypoint = lerp(y, ypoint, timerscale / 2);
|
|
8
|
draw_sprite_ext(sprite_index, image_index, x, ypoint, 1 + (timerscale / 2), (1 - (timerscale / 2)) * yscale, 0, c_white, 1);
|
|
9
|
if (timer > 0)
|
|
10
|
{
|
|
11
|
d3d_set_fog(true, c_white, 0, 1);
|
|
12
|
draw_sprite_ext(sprite_index, image_index, x, ypoint, 1 + (timerscale / 2), (1 - (timerscale / 2)) * yscale, 0, c_white, (10 - timer) / 10);
|
|
13
|
d3d_set_fog(false, c_black, 0, 0);
|
|
14
|
}
|
|
15
|
}
|
|
16
|
else
|
|
17
|
{
|
|
18
|
scr_drawpart_cropscr_drawpart_crop
function scr_drawpart_crop(arg0, arg1, arg2, arg3)
{
var _true_xanchor = x - abs(sprite_xoffset);
var _true_yanchor = y - abs(sprite_yoffset);
if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3)
{
draw_self();
exit;
}
var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width));
var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height));
var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width));
var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height));
draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha);
} (minx, 0, maxx, 800);
|
|
19
|
}
|
|
20
|
if ((x + 20) < minx)
|
|
21
|
instance_destroy();
|