Class AbyssalLightEntityPlugin

java.lang.Object
com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
com.fs.starfarer.api.impl.campaign.AbyssalLightEntityPlugin
All Implemented Interfaces:
CustomCampaignEntityPlugin

public class AbyssalLightEntityPlugin extends BaseCustomEntityPlugin
  • Field Details

    • SENSOR_BURST_TRIGGER_RANGE

      public static float SENSOR_BURST_TRIGGER_RANGE
    • DWELLER_TRIGGER_RANGE

      public static float DWELLER_TRIGGER_RANGE
    • MIN_DURATION

      public static float MIN_DURATION
    • MAX_DURATION

      public static float MAX_DURATION
    • MIN_SIZE

      public static float MIN_SIZE
    • MAX_SIZE

      public static float MAX_SIZE
    • DESPAWN_POOF_THRESHOLD

      public static float DESPAWN_POOF_THRESHOLD
    • GLOW_FREQUENCY

      public static float GLOW_FREQUENCY
    • PLAYER_PROXIMITY_MIN_BRIGHTNESS_AT

      public static float PLAYER_PROXIMITY_MIN_BRIGHTNESS_AT
    • PLAYER_PROXIMITY_MAX_BRIGHTNESS_AT

      public static float PLAYER_PROXIMITY_MAX_BRIGHTNESS_AT
    • PLAYER_PROXIMITY_MIN_BRIGHTNESS

      public static float PLAYER_PROXIMITY_MIN_BRIGHTNESS
    • phase

      protected float phase
    • frequencyMult

      protected float frequencyMult
    • flicker

      protected FlickerUtilV2 flicker
    • fader

      protected FaderUtil fader
    • params

    • untilFrequencyChange

      protected float untilFrequencyChange
    • untilSoundPlayed

      protected float untilSoundPlayed
    • flickerDur

      protected float flickerDur
    • abilityResponseFlickerTimeout

      protected float abilityResponseFlickerTimeout
    • despawnType

      protected AbyssalLightEntityPlugin.DespawnType despawnType
    • playedDespawnSound

      protected boolean playedDespawnSound
  • Constructor Details

    • AbyssalLightEntityPlugin

      public AbyssalLightEntityPlugin()
  • Method Details

    • init

      public void init(SectorEntityToken entity, Object pluginParams)
      Specified by:
      init in interface CustomCampaignEntityPlugin
      Overrides:
      init in class BaseCustomEntityPlugin
    • isDespawning

      public boolean isDespawning()
    • despawn

      public void despawn(AbyssalLightEntityPlugin.DespawnType type)
    • updateSoundDelayAndPlaySound

      public void updateSoundDelayAndPlaySound(float amount)
    • updateFrequency

      public void updateFrequency(float amount)
    • getParams

    • isDweller

      public boolean isDweller()
    • advance

      public void advance(float amount)
      Specified by:
      advance in interface CustomCampaignEntityPlugin
      Overrides:
      advance in class BaseCustomEntityPlugin
      Parameters:
      amount - in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.
    • getFlickerBasedMult

      public float getFlickerBasedMult()
    • getGlowAlpha

      public float getGlowAlpha()
    • getRenderRange

      public float getRenderRange()
      Description copied from interface: CustomCampaignEntityPlugin
      How far away from the viewport the center of this entity can be before it stops being rendered. Should at least be the radius of the entity; sometimes more may be necessary depending on the visual effect desired.
      Specified by:
      getRenderRange in interface CustomCampaignEntityPlugin
      Overrides:
      getRenderRange in class BaseCustomEntityPlugin
      Returns:
    • getDespawnProgress

      public float getDespawnProgress()
    • render

      public void render(CampaignEngineLayers layer, ViewportAPI viewport)
      Description copied from interface: CustomCampaignEntityPlugin
      Should only render for specified layer. Will be called once per each layer, per frame. Needs to respect viewport.getAlphaMult() - i.e. use that alpha value for rendering. Needs to render at the entity's location - there's no translation before this method call. If a sprite is specified, it will be rendered in the bottommost layer of the layers this entity renders for. This method will be called after the sprite has rendered.
      Specified by:
      render in interface CustomCampaignEntityPlugin
      Overrides:
      render in class BaseCustomEntityPlugin
    • getPlayerProximityBasedBrightnessFactor

      public static float getPlayerProximityBasedBrightnessFactor(SectorEntityToken entity)
    • getPlayerProximityBasedBrightnessFactor

      public static float getPlayerProximityBasedBrightnessFactor(org.lwjgl.util.vector.Vector2f loc)
    • getProximityBasedBrightnessFactor

      public static float getProximityBasedBrightnessFactor(CampaignFleetAPI from, org.lwjgl.util.vector.Vector2f loc)