1 | if (active == 1) |
2 | { |
3 | if (x < 160) |
4 | x += ballRollSpeed |
5 | else |
6 | { |
7 | alarm[0] = 15 |
8 | active = 0 |
9 | } |
10 | if (x > 140 && ballRollSpeed > 0.5) |
11 | ballRollSpeed -= 0.1 |
12 | } |
13 | if (active == 3) |
14 | { |
15 | if (x < 260) |
16 | x += ballRollSpeed |
17 | else |
18 | { |
19 | alarm[0] = 15 |
20 | active = 4 |
21 | } |
22 | ballRollSpeed += 0.1 |
23 | } |