Starsector API
Loading...
Searching...
No Matches
BaseGhostBehaviorInterrupt.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.ghosts;
2
3import com.fs.starfarer.api.Global;
4
6 protected float delay;
7
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}
static SectorAPI getSector()
Definition Global.java:59
boolean shouldInterruptBehavior(SensorGhost ghost, GhostBehavior behavior)
void advance(float amount, SensorGhost ghost, GhostBehavior behavior)