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