Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_card_game_controller_Draw_74

(view raw script w/o annotations or w/e)
1
draw_set_alpha(cardg_draw_alpha)
2
draw_sprite(spr_card_game_background, 0, 0, 0)
3
draw_sprite(spr_card_game_template, 0, 0, 0)
4
draw_sprite(spr_card_game_hud, 0, 0, 0)
5
draw_set_font(fnt_main)
6
draw_set_color(c_white)
7
draw_set_halign(fa_left)
8
draw_text(32, 16, string_hash_to_newline(string(clamp((instance_number(obj_card_game_card) - 20), 0, 999))))
9
draw_set_halign(fa_center)
10
if (cardg_flash == true)
11
{
12
    var time_in_seconds = cardg_timer / 30
13
    if (time_in_seconds < cardg_time_gold)
14
        draw_set_color(c_yellow)
15
    else if (time_in_seconds < cardg_time_silver)
16
        draw_set_color(c_aqua)
17
    else
18
        draw_set_color(make_colour_rgb(80, 50, 20))
19
}
20
draw_text(290, 16, string_hash_to_newline((string((cardg_timer / 30) div 60)) + ":" + (string((floor(cardg_timer / 30)) % 60))))
21
if (cardg_intro_countdown > 0)
22
{
23
    draw_set_halign(fa_center)
24
    if (cardg_intro_countdown > 90)
25
        var countdown_text = "3"
26
    else if (cardg_intro_countdown > 60)
27
        countdown_text = "2"
28
    else if (cardg_intro_countdown > 30)
29
        countdown_text = "1"
30
    else
31
        countdown_text = "GO!"
32
    draw_set_alpha(cardg_intro_countdown_alpha)
33
    draw_text_transformed(160, 80, string_hash_to_newline(countdown_text), 4, 4, 0)
34
    draw_set_alpha(cardg_draw_alpha)
35
}
36
if (cardg_victory == true)
37
{
38
    draw_set_alpha(cardg_draw_alpha * 0.5)
39
    draw_set_color(c_black)
40
    draw_rectangle(0, 0, 320, 240, false)
41
    draw_set_alpha(cardg_draw_alpha)
42
    draw_set_color(c_white)
43
    draw_sprite(spr_card_game_victory, 0, 160, 80)
44
    draw_set_halign(fa_center)
45
    draw_text(160, 120, string_hash_to_newline(string(floor(cardg_g_gained)) + "G won!"))
46
}
47
if (cardg_failure == true)
48
{
49
    draw_set_alpha(cardg_draw_alpha * 0.5)
50
    draw_set_color(c_black)
51
    draw_rectangle(0, 0, 320, 240, false)
52
    draw_set_alpha(cardg_draw_alpha)
53
    draw_set_color(c_white)
54
    draw_sprite(spr_card_game_failure, 0, 160, 80)
55
    draw_set_halign(fa_center)
56
    draw_text(160, 120, string_hash_to_newline("0G won. Better luck next time!"))
57
}
58
draw_set_alpha(1)