Starsector API
Loading...
Searching...
No Matches
BaseGhostBehaviorInterrupt.java
Go to the documentation of this file.
1
package
com.fs.starfarer.api.impl.campaign.ghosts;
2
3
import
com.fs.starfarer.api.Global;
4
5
public
class
BaseGhostBehaviorInterrupt
implements
GhostBehaviorInterrupt
{
6
protected
float
delay
;
7
8
public
BaseGhostBehaviorInterrupt
(
float
delay
) {
9
this.delay =
delay
;
10
}
11
12
public
void
advance
(
float
amount,
SensorGhost
ghost,
GhostBehavior
behavior) {
13
float
days =
Global
.
getSector
().getClock().convertToDays(amount);
14
delay
-= days;
15
}
16
17
public
boolean
shouldInterruptBehavior
(
SensorGhost
ghost,
GhostBehavior
behavior) {
18
return
false
;
19
}
20
21
protected
boolean
hasDelayRemaining
() {
22
return
delay
> 0;
23
}
24
25
26
}
com.fs.starfarer.api.Global
Definition
Global.java:13
com.fs.starfarer.api.Global.getSector
static SectorAPI getSector()
Definition
Global.java:59
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt
Definition
BaseGhostBehaviorInterrupt.java:5
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt.BaseGhostBehaviorInterrupt
BaseGhostBehaviorInterrupt(float delay)
Definition
BaseGhostBehaviorInterrupt.java:8
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt.shouldInterruptBehavior
boolean shouldInterruptBehavior(SensorGhost ghost, GhostBehavior behavior)
Definition
BaseGhostBehaviorInterrupt.java:17
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt.hasDelayRemaining
boolean hasDelayRemaining()
Definition
BaseGhostBehaviorInterrupt.java:21
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt.advance
void advance(float amount, SensorGhost ghost, GhostBehavior behavior)
Definition
BaseGhostBehaviorInterrupt.java:12
com.fs.starfarer.api.impl.campaign.ghosts.BaseGhostBehaviorInterrupt.delay
float delay
Definition
BaseGhostBehaviorInterrupt.java:6
com.fs.starfarer.api.impl.campaign.ghosts.GhostBehaviorInterrupt
Definition
GhostBehaviorInterrupt.java:3
com.fs.starfarer.api.impl.campaign.ghosts.GhostBehavior
Definition
GhostBehavior.java:3
com.fs.starfarer.api.impl.campaign.ghosts.SensorGhost
Definition
SensorGhost.java:11
src
com
fs
starfarer
api
impl
campaign
ghosts
BaseGhostBehaviorInterrupt.java
Generated by
1.9.8