Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_singlescreen_hud_time_counter_Draw_0

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_tenna_enemy))
2
    exit;
3
var jump = abs(x - xprevious) * 0.125;
4
var jumpoff = -abs(sin(timer * 0.5) * jump * 2) + 4;
5
anim_timer += image_speed;
6
if (anim_timer >= 2)
7
    anim_timer -= 2;
8
var py1 = floor(anim_timer) * 4;
9
var time_format = string_format(time, 2, 0);
10
draw_set_font(fnt_comicsans);
11
draw_set_halign(fa_center);
12
draw_set_valign(fa_middle);
13
draw_sprite_ext(sprite_index, image_index, round(x), y + jumpoff, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
14
draw_sprite_ext(spr_susiezilla_shadowman_time_paper, image_index, round((x - 6) + py1), (y - 44) + jumpoff, image_xscale, flip_scale * 2, image_angle, image_blend, image_alpha);
15
if (!flip)
16
    draw_text_transformed_color(round((x - 6) + py1 + 2), (y - 44) + jumpoff, string_char_at(string(time_format), digit), 2, 2, 0, c_black, c_black, c_black, c_black, 1);
17
draw_sprite_ext(spr_susiezilla_hudguy_time_counter_overlay, anim_timer, round(x), y + jumpoff, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
18
draw_set_halign(fa_left);
19
draw_set_valign(fa_top);