Starsector API
Loading...
Searching...
No Matches
GBIRunScript.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.ghosts;
2
3import com.fs.starfarer.api.Script;
4
6
7 protected Script script;
8 protected boolean endBehaviorWhenRun;
9
11 super(delay);
12 this.script = script;
13 this.endBehaviorWhenRun = endBehaviorWhenRun;
14 }
15
16 @Override
17 public boolean shouldInterruptBehavior(SensorGhost ghost, GhostBehavior behavior) {
18 if (hasDelayRemaining()) return false;
19
20 if (script != null) {
21 script.run();
22 script = null;
23 }
24
25 return endBehaviorWhenRun;
26 }
27
28
29}
boolean shouldInterruptBehavior(SensorGhost ghost, GhostBehavior behavior)
GBIRunScript(float delay, Script script, boolean endBehaviorWhenRun)