Starsector API
Loading...
Searching...
No Matches
GBStormArea.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.ghosts;
2
3import com.fs.starfarer.api.campaign.SectorEntityToken;
4import com.fs.starfarer.api.impl.campaign.terrain.HyperspaceTerrainPlugin;
5import com.fs.starfarer.api.impl.campaign.terrain.HyperspaceTerrainPlugin.CellState;
6import com.fs.starfarer.api.util.Misc;
7
8public class GBStormArea extends BaseGhostBehavior {
9
10 protected float radius;
11
12 public GBStormArea(float radius) {
13 super(1f);
14 this.radius = radius;
15 }
16
17 @Override
18 public void advance(float amount, SensorGhost ghost) {
19 super.advance(amount, ghost);
20
21 SectorEntityToken entity = ghost.getEntity();
22 HyperspaceTerrainPlugin plugin = (HyperspaceTerrainPlugin) Misc.getHyperspaceTerrain().getPlugin();
23 if (plugin != null && entity.isInHyperspace()) {
24 plugin.setTileState(entity.getLocation(), 1000f,
25 CellState.SIGNAL,
26 0f, 0.1f, 0.8f);
27 }
28 end();
29 }
30}
void advance(float amount, SensorGhost ghost)