public class BaseCustomEntityPlugin extends java.lang.Object implements CustomCampaignEntityPlugin
Modifier and Type | Field and Description |
---|---|
protected SectorEntityToken |
entity |
Constructor and Description |
---|
BaseCustomEntityPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
advance(float amount) |
void |
appendToCampaignTooltip(TooltipMakerAPI tooltip,
SectorEntityToken.VisibilityLevel level) |
void |
createMapTooltip(TooltipMakerAPI tooltip,
boolean expanded) |
float |
getMapTooltipWidth() |
float |
getRenderRange()
How far away from the viewport the center of this entity can be before it stops being rendered.
|
boolean |
hasCustomMapTooltip() |
void |
init(SectorEntityToken entity,
java.lang.Object pluginParams) |
boolean |
isMapTooltipExpandable() |
void |
render(CampaignEngineLayers layer,
ViewportAPI viewport)
Should only render for specified layer.
|
protected SectorEntityToken entity
public void init(SectorEntityToken entity, java.lang.Object pluginParams)
init
in interface CustomCampaignEntityPlugin
public void advance(float amount)
advance
in interface CustomCampaignEntityPlugin
amount
- in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.public float getRenderRange()
CustomCampaignEntityPlugin
getRenderRange
in interface CustomCampaignEntityPlugin
public void render(CampaignEngineLayers layer, ViewportAPI viewport)
CustomCampaignEntityPlugin
render
in interface CustomCampaignEntityPlugin
public boolean hasCustomMapTooltip()
hasCustomMapTooltip
in interface CustomCampaignEntityPlugin
public float getMapTooltipWidth()
getMapTooltipWidth
in interface CustomCampaignEntityPlugin
public boolean isMapTooltipExpandable()
isMapTooltipExpandable
in interface CustomCampaignEntityPlugin
public void createMapTooltip(TooltipMakerAPI tooltip, boolean expanded)
createMapTooltip
in interface CustomCampaignEntityPlugin
public void appendToCampaignTooltip(TooltipMakerAPI tooltip, SectorEntityToken.VisibilityLevel level)
appendToCampaignTooltip
in interface CustomCampaignEntityPlugin
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.