Starsector API
Loading...
Searching...
No Matches
GBGoAwayFrom.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.ghosts;
2
3import org.lwjgl.util.vector.Vector2f;
4
5import com.fs.starfarer.api.campaign.SectorEntityToken;
6import com.fs.starfarer.api.util.Misc;
7
8
9public class GBGoAwayFrom extends BaseGhostBehavior {
10
12 protected int maxBurn;
13
15 super(duration);
16 this.from = from;
17 this.maxBurn = maxBurn;
18 }
19
20
21
22 @Override
23 public void advance(float amount, SensorGhost ghost) {
25 end();
26 return;
27 }
28 super.advance(amount, ghost);
29
31 loc.scale(10000f);
32 Vector2f.add(loc, ghost.getEntity().getLocation(), loc);
33 ghost.moveTo(loc, maxBurn);
34
35 }
36
37
38
39}
40
41
42
43
44
45
46
47
48
49
50
51
52
void advance(float amount, SensorGhost ghost)
GBGoAwayFrom(float duration, SectorEntityToken from, int maxBurn)
static Vector2f getUnitVectorAtDegreeAngle(float degrees)
Definition Misc.java:1196
static float getAngleInDegrees(Vector2f v)
Definition Misc.java:1126
void moveTo(Vector2f dest, float maxBurn)