-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrawOtherTrees.pde
30 lines (21 loc) · 1000 Bytes
/
drawOtherTrees.pde
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
void drawOtherTrees () {
for (int i = otherTreesCurrentAngle.length - 1; i >= 0; i--) {
if (i >= maxNoOfTrees && otherTreesCurrentHeight[i] > 0.01) {
int cRand = round(random(0.5,3.4));
switch (cRand) {
case 1:
otherTreesColoursRed[i] = max(0, otherTreesColoursRed[i] - decayRate);
// println(cRand);
case 2:
otherTreesColoursGreen[i] = max(0, otherTreesColoursGreen[i] - decayRate);
// println(cRand);
case 3:
otherTreesColoursBlue[i] = max(0, otherTreesColoursBlue[i] - decayRate);
// println(cRand);
}
}
if (otherTreesColoursRed[i] + otherTreesColoursGreen[i] + otherTreesColoursBlue[i] > 0 && otherTreesCurrentHeight[i] > 0.01) {
standingTree(otherTreesCurrentAngle[i], otherTreesCurrentHeight[i], otherTreesGrowthPlace[i], otherTreesColoursRed[i], otherTreesColoursGreen[i], otherTreesColoursBlue[i]);
}
}
}