1 |
x = idealx; |
2 |
y = idealy; |
3 |
w = sprite_width; |
4 |
h = sprite_height; |
5 |
if (obj_heart.x < (x + 4)) |
6 |
{ |
7 |
if (x > maxx) |
8 |
{ |
9 |
idealx -= 0.5; |
10 |
x -= 0.5; |
11 |
event_user(0); |
12 |
} |
13 |
else |
14 |
{ |
15 |
x = maxx; |
16 |
idealx = maxx; |
17 |
} |
18 |
obj_heart.x = ceil(x + 5); |
19 |
} |
20 |
if (obj_heart.y < (y + 4)) |
21 |
obj_heart.y = y + 4; |
22 |
if (obj_heart.x > ((x + w) - 16)) |
23 |
obj_heart.x = (x + w) - 16; |
24 |
if (obj_heart.y > ((y + h) - 16)) |
25 |
{ |
26 |
if (y < maxy && x == maxx) |
27 |
{ |
28 |
idealy += 0.5; |
29 |
y += 0.5; |
30 |
event_user(0); |
31 |
} |
32 |
obj_heart.y = floor((y + h) - 17); |
33 |
} |