| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
image_alpha = obj_crayon_minigame.draw_alpha; |
| 4 |
pointed_at = point_in_rectangle(mouse_x, mouse_y, bbox_left, bbox_top, bbox_right, bbox_bottom); |
| 5 |
if (pointed_at == true) |
| 6 |
{ |
| 7 |
with (obj_crayon) |
| 8 |
{ |
| 9 |
if (id != other.id && pointed_at == true) |
| 10 |
{ |
| 11 |
other.pointed_at = false; |
| 12 |
exit; |
| 13 |
} |
| 14 |
} |
| 15 |
if (keyboard_multicheck_pressed(0) || mouse_check_button_pressed(mb_left)) |
| 16 |
{ |
| 17 |
if (pointed_at == true) |
| 18 |
{ |
| 19 |
audio_play_sound(snd_crayon_select, 1, 0); |
| 20 |
obj_crayon_minigame.crayon_selected = crayon_color; |
| 21 |
draw_y_offset = -10; |
| 22 |
} |
| 23 |
} |
| 24 |
draw_y_offset = lerp(draw_y_offset, -5, 0.25); |
| 25 |
} |
| 26 |
else |
| 27 |
{ |
| 28 |
draw_y_offset = lerp(draw_y_offset, 0, 0.15); |
| 29 |
} |