38 if (
spawn.intervalElapsed()) {
50 if ((
float) Math.random() < 0.01f) {
56 List<PlanetAPI> stars =
new ArrayList<PlanetAPI>();
58 float minDist = Float.MAX_VALUE;
60 if (!star.isStar())
continue;
63 float dist = ctcDist - star.getRadius() -
tap.
getRadius();
64 if (dist > 2000)
continue;
66 if (ctcDist < minDist) {
91 Vector2f focusLoc =
new Vector2f(unitToTap);
92 focusLoc.scale(100f + star.getRadius() +
tap.
getRadius());
93 Vector2f.add(star.getLocation(), focusLoc, focusLoc);
98 float dist = ctcDist - star.getRadius() -
tap.
getRadius();
101 float minRadius = dist + (star.getRadius() * 0.2f);
102 float maxRadius = dist + (star.getRadius() * 0.4f);
104 Color color = star.getSpec().getCoronaColor();
106 float colorScale = 0.25f;
107 colorScale = 0.1f + 0.15f / (float) stars.size();
108 if (closest == star) colorScale = 0.25f;
113 float arc = star.getRadius() / ((float) Math.PI * (ctcDist -
tap.
getRadius())) * 360f;
115 for (
int i = 0; i < glows; i++) {
116 float radius = minRadius + (float) Math.random() * (maxRadius - minRadius);
118 float angle = dirToStar - arc / 2f + arc * (float) Math.random();
121 float x = unit.x * radius + focusLoc.x;
122 float y = unit.y * radius + focusLoc.y;
124 Vector2f loc =
new Vector2f(x, y);
129 travelDist = Math.min(travelDist, maxRadius - minRadius + 100f);
133 float speed = 100f + 100f * (float) Math.random();
134 float dur = travelDist / speed;
138 float size = minSize + (float) Math.random() * (maxSize - minSize);
144 size, 0.4f, rampUp, dur, color);
146 size * 0.25f, 0.4f, rampUp, dur, color);