|
11 | 11 | import mindustry.graphics.Pal; |
12 | 12 |
|
13 | 13 | import static arc.graphics.g2d.Draw.color; |
| 14 | +import static arc.graphics.g2d.Lines.lineAngle; |
14 | 15 | import static arc.graphics.g2d.Lines.stroke; |
15 | 16 | import static arc.math.Angles.randLenVectors; |
16 | 17 |
|
17 | 18 | public class ExoChargeFx { |
18 | 19 | public static final Effect |
19 | | - starChargePink = new Effect(100f, 160f, e -> { |
20 | | - color(ExoPal.empyreanPinkLight); |
21 | | - Fill.circle(e.x, e.y, e.fin() * 10); |
22 | | - color(Color.white); |
23 | | - Fill.circle(e.x, e.y, e.fin() * 6); |
24 | | - }).followParent(true).rotWithParent(true), |
25 | | - |
26 | | - OrbitalCharge = new Effect(160f, 100f, e -> { |
27 | | - color(Pal.heal); |
28 | | - stroke(e.fin() * 3f); |
29 | | - Lines.circle(e.x, e.y, 18f + e.fout() * 100f); |
30 | | - |
31 | | - Fill.circle(e.x, e.y, e.fin() * 20); |
32 | | - |
33 | | - randLenVectors(e.id, 20, 40f * e.fout(), (x, y) -> { |
34 | | - Fill.circle(e.x + x, e.y + y, e.fin() * 5f); |
35 | | - Drawf.light(e.x + x, e.y + y, e.fin() * 15f, Pal.heal, 0.7f); |
36 | | - }); |
37 | | - |
38 | | - color(); |
39 | | - |
40 | | - Fill.circle(e.x, e.y, e.fin() * 10); |
41 | | - Drawf.light(e.x, e.y, e.fin() * 20f, Pal.heal, 0.7f); |
42 | | - }).followParent(true).rotWithParent(true), |
43 | | - |
44 | | - demiurgeCharge = new Effect(106f, e -> { |
45 | | - color(ExoPal.empyreanIndigo); |
46 | | - |
47 | | - stroke(e.fin() * 2f); |
48 | | - Lines.circle(e.x, e.y, 8f + e.fout() * 100f); |
49 | | - |
50 | | - Fill.circle(e.x, e.y, e.fin() * 10f); |
51 | | - color(Color.white); |
52 | | - Fill.circle(e.x, e.y, e.fin() * 6f); |
53 | | - |
54 | | - Drawf.tri(e.x, e.y, 12f * e.fout(), 55f + (20f * e.fin()), e.rotation); |
55 | | - |
56 | | - for (int i = 0; i < 2; i++) { |
57 | | - Drawf.tri(e.x, e.y, 16f * e.fout(), 40f, e.rotation + (0f + (e.fin(Interp.circleOut) * 54f)) * Mathf.signs[i]); |
58 | | - } |
59 | | - for (int i = 0; i < 2; i++) { |
60 | | - Drawf.tri(e.x, e.y, 12f * e.fout(), 35f, e.rotation + (0f + (e.fin(Interp.circleOut) * 36.0f)) * Mathf.signs[i]); |
61 | | - } |
62 | | - for (int i = 0; i < 2; i++) { |
63 | | - Drawf.tri(e.x, e.y, 9f * e.fout(), 20f, e.rotation + (0f + (e.fin(Interp.circleOut) * 18f)) * Mathf.signs[i]); |
64 | | - } |
65 | | - }); |
| 20 | + superCriticalCharge = new Effect(38f, e -> { |
| 21 | + color(e.color); |
| 22 | + |
| 23 | + randLenVectors(e.id, 14, 1f + 20f * e.fout(), e.rotation, 190f, (x, y) -> { |
| 24 | + lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 5f + 1f); |
| 25 | + }); |
| 26 | + }), |
| 27 | + |
| 28 | + superCriticalChargeBegin = new Effect(60f, e -> { |
| 29 | + float margin = 1f - Mathf.curve(e.fin(), 0.9f); |
| 30 | + float fin = Math.min(margin, e.fin()); |
| 31 | + |
| 32 | + color(e.color); |
| 33 | + Fill.circle(e.x, e.y, fin * 6f); |
| 34 | + |
| 35 | + color(); |
| 36 | + Fill.circle(e.x, e.y, fin * 5f); |
| 37 | + }), |
| 38 | + |
| 39 | + starChargePink = new Effect(100f, 160f, e -> { |
| 40 | + color(ExoPal.empyreanPinkLight); |
| 41 | + Fill.circle(e.x, e.y, e.fin() * 10); |
| 42 | + color(Color.white); |
| 43 | + Fill.circle(e.x, e.y, e.fin() * 6); |
| 44 | + }).followParent(true).rotWithParent(true), |
| 45 | + |
| 46 | + OrbitalCharge = new Effect(160f, 100f, e -> { |
| 47 | + color(Pal.heal); |
| 48 | + stroke(e.fin() * 3f); |
| 49 | + Lines.circle(e.x, e.y, 18f + e.fout() * 100f); |
| 50 | + |
| 51 | + Fill.circle(e.x, e.y, e.fin() * 20); |
| 52 | + |
| 53 | + randLenVectors(e.id, 20, 40f * e.fout(), (x, y) -> { |
| 54 | + Fill.circle(e.x + x, e.y + y, e.fin() * 5f); |
| 55 | + Drawf.light(e.x + x, e.y + y, e.fin() * 15f, Pal.heal, 0.7f); |
| 56 | + }); |
| 57 | + |
| 58 | + color(); |
| 59 | + |
| 60 | + Fill.circle(e.x, e.y, e.fin() * 10); |
| 61 | + Drawf.light(e.x, e.y, e.fin() * 20f, Pal.heal, 0.7f); |
| 62 | + }).followParent(true).rotWithParent(true), |
| 63 | + |
| 64 | + demiurgeCharge = new Effect(106f, e -> { |
| 65 | + color(ExoPal.empyreanIndigo); |
| 66 | + |
| 67 | + stroke(e.fin() * 2f); |
| 68 | + Lines.circle(e.x, e.y, 8f + e.fout() * 100f); |
| 69 | + |
| 70 | + Fill.circle(e.x, e.y, e.fin() * 10f); |
| 71 | + color(Color.white); |
| 72 | + Fill.circle(e.x, e.y, e.fin() * 6f); |
| 73 | + |
| 74 | + Drawf.tri(e.x, e.y, 12f * e.fout(), 55f + (20f * e.fin()), e.rotation); |
| 75 | + |
| 76 | + for (int i = 0; i < 2; i++) { |
| 77 | + Drawf.tri(e.x, e.y, 16f * e.fout(), 40f, e.rotation + (0f + (e.fin(Interp.circleOut) * 54f)) * Mathf.signs[i]); |
| 78 | + } |
| 79 | + for (int i = 0; i < 2; i++) { |
| 80 | + Drawf.tri(e.x, e.y, 12f * e.fout(), 35f, e.rotation + (0f + (e.fin(Interp.circleOut) * 36.0f)) * Mathf.signs[i]); |
| 81 | + } |
| 82 | + for (int i = 0; i < 2; i++) { |
| 83 | + Drawf.tri(e.x, e.y, 9f * e.fout(), 20f, e.rotation + (0f + (e.fin(Interp.circleOut) * 18f)) * Mathf.signs[i]); |
| 84 | + } |
| 85 | + }); |
66 | 86 | } |
0 commit comments