Class FusionLampEntityPlugin

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

public class FusionLampEntityPlugin extends BaseCustomEntityPlugin
  • Field Details

    • GLOW_COLOR

      public static Color GLOW_COLOR
    • LIGHT_COLOR

      public static Color LIGHT_COLOR
    • VOLATILES_SHORTAGE_KEY

      public static String VOLATILES_SHORTAGE_KEY
    • GLOW_COLOR_KEY

      public static String GLOW_COLOR_KEY
    • LIGHT_COLOR_KEY

      public static String LIGHT_COLOR_KEY
    • GLOW_FREQUENCY

      public static float GLOW_FREQUENCY
    • phase

      protected float phase
    • flicker

      protected FlickerUtilV2 flicker
  • Constructor Details

    • FusionLampEntityPlugin

      public FusionLampEntityPlugin()
  • Method Details

    • init

      public void init(SectorEntityToken entity, Object pluginParams)
      Specified by:
      init in interface CustomCampaignEntityPlugin
      Overrides:
      init in class BaseCustomEntityPlugin
    • 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()
    • getLightAlpha

      public float getLightAlpha()
    • getGlowColor

      public Color getGlowColor()
    • getLightColor

      public Color getLightColor()
    • setGlowColor

      public void setGlowColor(Color color)
    • setLightColor

      public void setLightColor(Color color)
    • 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:
    • 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