|
1
|
draw_self();
|
|
2
|
draw_sprite_ext(spr_darkbulb_icon_back, 0, x - 1, y - 45, 2, 2, 0, c_white, 1);
|
|
3
|
gpu_set_blendmode(bm_add);
|
|
4
|
for (i = 0; i <= active; i++)
|
|
5
|
draw_sprite_ext(puzzle_icon, 0, x - 1, y - 45, 2, 2, 0, icon_color, 1 + (i * 0.2));
|
|
6
|
var _xx = 320 + (((x + 20) - 320) * 1.25);
|
|
7
|
var _spotlightRotation;
|
|
8
|
if (obj_shapepuzzle.goalHit)
|
|
9
|
{
|
|
10
|
_spotlightRotation = point_direction(_xx, 26, obj_shapepuzzle.x + (obj_shapepuzzle.sprite_width / 2), obj_shapepuzzle.y + (obj_shapepuzzle.sprite_height / 2)) + 90;
|
|
11
|
}
|
|
12
|
else
|
|
13
|
{
|
|
14
|
var pieceCenterLen = point_distance(0, 0, myPiece.sprite_width / 2, myPiece.sprite_height / 2);
|
|
15
|
var pieceCenterDir = point_direction(0, 0, myPiece.sprite_width / 2, myPiece.sprite_height / 2);
|
|
16
|
var pieceX = myPiece.x + lengthdir_x(pieceCenterLen, pieceCenterDir + myPiece.image_angle);
|
|
17
|
var pieceY = myPiece.y + lengthdir_y(pieceCenterLen, pieceCenterDir + myPiece.image_angle);
|
|
18
|
_spotlightRotation = point_direction(_xx, 26, pieceX, pieceY) + 90;
|
|
19
|
}
|
|
20
|
var _spotlight_color = myPiece.image_blend;
|
|
21
|
var glowBrightness = myPiece.active ? scr_wavescr_wave
function scr_wave(arg0, arg1, arg2, arg3)
{
var a4 = (arg1 - arg0) * 0.5;
return arg0 + a4 + (sin((((current_time * 0.001) + (arg2 * arg3)) / arg2) * (2 * pi)) * a4);
} (0, 0.2, 1, 0) : obj_shapepuzzle.finalGlow;
|
|
22
|
draw_sprite_ext(spr_darkbulb_spotlight, 3, _xx, 26, 1, 1, _spotlightRotation, _spotlight_color, 1);
|
|
23
|
if (glowBrightness > 0)
|
|
24
|
draw_sprite_ext(spr_darkbulb_spotlight, 3, _xx, 26, 1, 1, _spotlightRotation, c_white, glowBrightness);
|
|
25
|
gpu_set_blendmode(bm_normal);
|
|
26
|
draw_sprite_ext(spr_darkbulb_spotlight, 0, _xx, 26, 1, 1, _spotlightRotation, c_white, 1);
|
|
27
|
gpu_set_blendmode(bm_add);
|
|
28
|
draw_sprite_ext(spr_darkbulb_spotlight, 1, _xx, 26, 1, 1, _spotlightRotation, _spotlight_color, 1);
|
|
29
|
if (glowBrightness > 0)
|
|
30
|
draw_sprite_ext(spr_darkbulb_spotlight, 1, _xx, 26, 1, 1, _spotlightRotation, c_white, glowBrightness);
|
|
31
|
gpu_set_blendmode(bm_normal);
|
|
32
|
draw_sprite_ext(spr_darkbulb_spotlight, 2, _xx, 26, 1, 1, 0, c_white, 1);
|