1 | x += (sin(siner / 6) * sinerfactor); |
2 | siner += 1; |
3 | if (x > room_width) |
4 | { |
5 | x = -10; |
6 | if (room == room_tundra_town) |
7 | x = 2300; |
8 | } |
9 | if (room == room_water1) |
10 | { |
11 | if (y <= 50 && x >= 460 && moved == 0) |
12 | { |
13 | vspeed = -hspeed; |
14 | hspeed = 0; |
15 | moved = 1; |
16 | } |
17 | if (y <= 70 && x >= 480 && moved == 0) |
18 | { |
19 | vspeed = -hspeed; |
20 | hspeed = 0; |
21 | moved = 1; |
22 | } |
23 | if (y <= 90 && x >= 500 && moved == 0) |
24 | { |
25 | vspeed = -hspeed; |
26 | hspeed = 0; |
27 | moved = 1; |
28 | } |
29 | if (y <= -15) |
30 | { |
31 | moved = 0; |
32 | x = -10; |
33 | hspeed = 1.5; |
34 | y = ystart; |
35 | vspeed = 0; |
36 | } |
37 | } |