Deltarune script viewer

← back to main script listing

gml_Object_obj_lotteryMouseTrigger_Draw_0

(view raw script w/o annotations or w/e)
1
if (inert == 0)
2
{
3
    draw_self();
4
    with (obj_lottery_holemouse_generator)
5
    {
6
        if (gentimer > 0)
7
            other.image_index = 0;
8
        else
9
            other.image_index = 1;
10
    }
11
    if (image_index == 0)
12
        draw_amount = 10;
13
    if (image_index == 1)
14
    {
15
        if (draw_amount > 0)
16
            draw_amount = lerp(draw_amount, 0, 0.1);
17
        else
18
            draw_amount = 0;
19
    }
20
    draw_sprite_ext(sprite_index, 0, x, y, 2, 2, 0, c_white, draw_amount);
21
    draw_sprite_ext(spr_lotteryMouseTrigger_down, 0, x + 6, y + 16, 2, 2, 0, c_white, 1);
22
    draw_sprite_ext(spr_lotteryMouseTrigger_down, 1, x + 6, y + 16, 2, 2, 0, c_white, draw_amount);
23
}
24
if (inert == 1)
25
{
26
    image_index = 1;
27
    draw_self();
28
    draw_sprite_ext(spr_lotteryMouseTrigger_down, 0, x + 6, y + 16, 2, 2, 0, c_white, 1);
29
}