-
Notifications
You must be signed in to change notification settings - Fork 0
/
jumping_shapes.anf
139 lines (105 loc) · 3.61 KB
/
jumping_shapes.anf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
set CANVAS_WIDTH to 600
set CANVAS_HEIGHT to 600
set CANVAS_BACKGROUND to "#DEDEDE"
set MAX_NUM_OF_FRAMES to 10100
set FRAME_RATE to 100
shape1 = quad(58, 73, 29.000, 28.61, -3, 94.0076, 28.16, 77.19458)
shape1.fill("rgb(100, 200, 55)")
shape1.stroke("#000000")
shape2: Object = triangle(235, 332, 396, 315.57, 169, 164)
shape2.fill("rgb(200, 100, 155)")
shape2.stroke("#DEDEDE")
colors = ["#89AC76", "rgb(041, 49, +51)", "rgb(134, 115, 161)", "#1E2460", "#2271B3",
"rgb(203, 208, 204)", "#A18594", "#256D7B", "#20214F", "rgb(157, 161, 170)",
"rgb(237, 118, 14)", "#FFFF00", "#924E7D", "rgb(00, 187, 045)", "rgb(106, 95, 49)"]
info(length(colors))
info("=========")
colors.add("#DEDEDE")
info(length(colors))
info(colors)
info("=========")
colors.remove(3)
info(length(colors))
info(colors)
info("=========")
start_fr = 1
end_fr = 100
num: Number = 401
ctr: Number = 25
if num < 401:
info("Hey! shouldn't be printed!")
else if num < 500:
info("I'm printed!")
else if num < 600:
info("Not me...")
else:
info("Hmmm...")
# const x = 5
# x = 3
if num > 400 || num < 0:
repeat 5:
if num > 400 || num < 0:
num = 8
info("repeat")
else:
info("trigger me!")
break
info(num)
if num > 0 && num < 400:
if num < 100 || num > 300:
num = 5
info(num)
repeat 10:
if num < 100 || num > 300:
num = 5
info(num)
else:
break
else:
if num > 100 && num < 300:
while num <= 199 || num >= 301:
num = 5
new = colors[rand_num(0, length(colors)-1)]
if start_fr < ctr && start_fr:
shape1.moveY(-num, start_fr, ctr)
shape2.moveY(num-0.000, start_fr, ctr)
info(new)
shape1.fill(new)
shape1.stroke(new)
new = colors[rand_num(0, length(colors)-1)]
info(new)
shape2.fill(new)
shape2.stroke(new)
start_fr += ctr
if start_fr == ctr || start_fr > ctr:
shape1.moveY(+num, start_fr, ctr*2)
shape2.moveY(num*-1, start_fr, ctr*2)
start_fr += ctr
if start_fr != ctr && start_fr >= 50:
shape1.moveY(0-num, start_fr, ctr*3)
shape2.moveY(+num, start_fr, 75)
start_fr += ctr
shape1.fill(colors[rand_num(0, length(colors)-1)])
shape1.stroke(colors[rand_num(0, length(colors)-1)])
shape2.fill(colors[rand_num(0, length(colors)-1)])
shape2.stroke(colors[rand_num(0, length(colors)-1)])
if !(start_fr < 75):
shape1.moveY(num+0, start_fr, ctr*3)
shape2.moveY(-2*num+num, start_fr, 75)
shape1.fill(colors[rand_num(0, length(colors)-1)])
shape1.stroke(colors[rand_num(0, length(colors)-1)])
shape2.fill(colors[rand_num(0, length(colors)-1)])
shape2.stroke(colors[rand_num(0, length(colors)-1)])
start_fr += ctr
if start_fr >= end_fr:
shape1.moveY(0, start_fr, start_fr)
shape2.moveY(num-num, start_fr, start_fr)
shape1.fill(colors[rand_num(0, length(colors)-1)])
shape1.stroke(colors[rand_num(0, length(colors)-1)])
shape2.fill(colors[rand_num(0, length(colors)-1)])
shape2.stroke(colors[rand_num(0, length(colors)-1)])
else:
shape1.moveY(num-2*num, start_fr, end_fr)
shape2.moveY(2*num-num, start_fr, end_fr)
shape1.draw(1, 10000)
shape2.draw(1, 10000)