001package com.fs.starfarer.api.impl.campaign.ghosts;
002
003import com.fs.starfarer.api.Script;
004
005public class GBIRunEveryFrame extends BaseGhostBehaviorInterrupt {
006
007        protected Script script;
008
009        public GBIRunEveryFrame(float delay, Script script) {
010                super(delay);
011                this.script = script;
012        }
013
014        @Override
015        public boolean shouldInterruptBehavior(SensorGhost ghost, GhostBehavior behavior) {
016                if (hasDelayRemaining()) return false;
017
018                if (script != null) {
019                        script.run();
020                }
021                return false;
022        }
023
024        
025}