| 1 |
x += (sin(siner / 4) / 2); |
| 2 |
y += (cos(siner / 4) / 2); |
| 3 |
siner += 1; |
| 4 |
if (instance_exists(obj_flyjar)) |
| 5 |
{ |
| 6 |
image_alpha = obj_flyjar.image_alpha; |
| 7 |
if (x > obj_flyjar.bbox_right) |
| 8 |
{ |
| 9 |
x -= 4; |
| 10 |
if (hspeed > 0) |
| 11 |
hspeed = -hspeed; |
| 12 |
} |
| 13 |
if (x < obj_flyjar.bbox_left) |
| 14 |
{ |
| 15 |
x += 4; |
| 16 |
if (hspeed < 0) |
| 17 |
hspeed = -hspeed; |
| 18 |
} |
| 19 |
if (y < obj_flyjar.bbox_top) |
| 20 |
{ |
| 21 |
y += 4; |
| 22 |
if (vspeed < 0) |
| 23 |
vspeed = -vspeed; |
| 24 |
} |
| 25 |
if (y > obj_flyjar.bbox_bottom) |
| 26 |
{ |
| 27 |
y -= 4; |
| 28 |
if (vspeed > 0) |
| 29 |
vspeed = -vspeed; |
| 30 |
} |
| 31 |
} |
| 32 |
else |
| 33 |
{ |
| 34 |
instance_destroy(); |
| 35 |
} |