55 SectorEntityToken focus =
entity.getOrbitFocus();
56 if (focus instanceof PlanetAPI) {
57 PlanetAPI planet = (PlanetAPI) focus;
59 lightAlpha *=
entity.getSensorFaderBrightness();
60 lightAlpha *=
entity.getSensorContactFaderBrightness();
61 planet.setSecondLight(
62 new Vector3f(
entity.getLocation().x,
entity.getLocation().y,
entity.getCircularOrbitRadius() * 0.75f),
125 public void render(CampaignEngineLayers layer, ViewportAPI viewport) {
126 float alphaMult = viewport.getAlphaMult();
127 alphaMult *=
entity.getSensorFaderBrightness();
128 alphaMult *=
entity.getSensorContactFaderBrightness();
129 if (alphaMult <= 0)
return;
131 CustomEntitySpecAPI spec =
entity.getCustomEntitySpec();
132 if (spec ==
null)
return;
134 float w = spec.getSpriteWidth();
135 float h = spec.getSpriteHeight();
137 Vector2f loc =
entity.getLocation();
139 if (sprite !=
null) {
140 sprite.setAngle(
entity.getFacing() - 90f);
141 sprite.setSize(w, h);
142 sprite.setAlphaMult(alphaMult);
143 sprite.setNormalBlend();
144 sprite.renderAtCenter(loc.x, loc.y);
150 float glowAngle1 = (((
phase * 1.3f) % 1) - 0.5f) * 12f;
151 float glowAngle2 = (((
phase * 1.9f) % 1) - 0.5f) * 12f;
159 glow.setAlphaMult(alphaMult * glowAlpha * 0.5f);
160 glow.setAdditiveBlend();
162 glow.renderAtCenter(loc.x, loc.y);
164 for (
int i = 0; i < 5; i++) {
169 glow.setAlphaMult(alphaMult * glowAlpha * 0.67f);
170 glow.renderAtCenter(loc.x, loc.y);