Class AbstractScriptingEntity
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.live.InfoEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.live.AbstractScriptingEntity
-
- All Implemented Interfaces:
HasPosition2,HasPositionAndDimension2
- Direct Known Subclasses:
AiSpawnPortalsInWaves,AsteroidScenarioScriptingEntity,CheckGameMode,DefaultScriptingEntity,DespawnAlliesWhenCleared,LoadSceneScriptingEntity,LockObjectInPlace,MusicArea,NextObjectiveWhenAreaCleared,NextObjectiveWhenDestroyed,RespawnAsSpaceStation,SetDifficulty,SetGameSessionOptions,SetObjective,ShowDialog,WarpPlayer
public abstract class AbstractScriptingEntity extends InfoEntity
All scripts that can be placed in the game world (e.g. controlling a certain scene or being triggered when a ship approaches) derive from this class
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringcustom0protected Stringcustom1protected Stringcustom2protected Stringcustom3protected Stringcustom4protected intradius-
Fields inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
LOGGER, serverRestrictedEntities, serverRestrictedEntitySurfaceBo
-
-
Constructor Summary
Constructors Constructor Description AbstractScriptingEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCustom0()StringgetCustom1()StringgetCustom2()StringgetCustom3()StringgetCustom4()StringgetLabel()intgetRadius()voidlocalInit(AbstractEntityDef entityDef)Local initialization of transient fieldsprotected voidonClientCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity)Client side: Called when any entity entered this.radius.protected voidonClientCompositeEntityRadiusLeft(UUID compositeEntityId)Client side: Called when any entity left this.radius.voidonClientDrawEntity(List<RenderingBo> renderingBo)Client side: Draws this entityvoidonClientFrame(boolean selected)Client side: Callback on each frame for general logicprotected voidonClientTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities)Client side: Called on every turn, providing a list of entities currently inside radius.protected voidonServerCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity, GameSession gameSession)Server side: Called when any entity entered this.radius.protected voidonServerCompositeEntityRadiusLeft(UUID compositeEntityId, GameSession gameSession)Server side: Called when any entity left this.radius.protected voidonServerTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities, GameSession gameSession)Server side: Called on every turn, providing a list of entities currently inside radius.voidonServerTurnPass0(GameSession gameSession)Server side: Executes code on every server turn, main pass 1 of 2.voidsetCustom0(String custom0)voidsetCustom1(String custom1)voidsetCustom2(String custom2)voidsetCustom3(String custom3)voidsetCustom4(String custom4)voidsetLabel(String label)voidsetRadius(int radius)voidupdate(AbstractEntity other)Incremental update of non-transient fields (usually transferred from server)-
Methods inherited from class de.extio.spacecraft.shared.model.entity.builtin.live.InfoEntity
isDisplay
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
create, createClientDrawTileImageBo, getDimension, getEntityDef, getEntityDefUUID, getEntityLayer, getEntityManager, getOrientation, getParentCompositeEntity, getPosition, getServerRestrictedEntities, getServerRestrictEntitiesLastUpdate, getServerRestrictEntitiesWalls, getTileset, getTilesetPosition, getUuid, isDirty, isLocalInit, localCopy, onClientAction, onClientActionMessage, onClientGenerateEntityDetails, onClientSelectedPointToEntity, onClientSelectedPointToNoClientEntityAction, onClientSelectedPointToWorldPos, onServerActionMessage, onServerTurnPass1, onServerTurnPass2PostComposites, serverCleanupRestrictedEntities, serverPrepareRestrictedEntities, serverRestrictEntity, serverTranslateEntityPass0, serverTranslateEntityPass1, setClientActions, setDirty, setEntityDef, setEntityManager, setLocalInit, setOrientation, setParentCompositeEntity, setPosition, setServerRestrictedEntities, setServerRestrictEntitiesLastUpdate, setServerRestrictEntitiesWalls, setUuid
-
-
-
-
Method Detail
-
onClientCompositeEntityRadiusEntered
protected void onClientCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity)
Client side: Called when any entity entered this.radius. Feature is disabled when radius is 0
-
onClientCompositeEntityRadiusLeft
protected void onClientCompositeEntityRadiusLeft(UUID compositeEntityId)
Client side: Called when any entity left this.radius. Feature is disabled when radius is 0
-
onClientTurnCompositeEntitiesInRadius
protected void onClientTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities)
Client side: Called on every turn, providing a list of entities currently inside radius. Feature is disabled when radius is 0
-
onServerCompositeEntityRadiusEntered
protected void onServerCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity, GameSession gameSession)
Server side: Called when any entity entered this.radius. Feature is disabled when radius is 0
-
onServerCompositeEntityRadiusLeft
protected void onServerCompositeEntityRadiusLeft(UUID compositeEntityId, GameSession gameSession)
Server side: Called when any entity left this.radius. Feature is disabled when radius is 0
-
onServerTurnCompositeEntitiesInRadius
protected void onServerTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities, GameSession gameSession)
Server side: Called on every turn, providing a list of entities currently inside radius. Feature is disabled when radius is 0
-
localInit
public void localInit(AbstractEntityDef entityDef)
Description copied from class:AbstractEntityLocal initialization of transient fields- Overrides:
localInitin classAbstractEntity
-
update
public void update(AbstractEntity other)
Description copied from class:AbstractEntityIncremental update of non-transient fields (usually transferred from server)- Overrides:
updatein classAbstractEntity
-
onClientDrawEntity
public void onClientDrawEntity(List<RenderingBo> renderingBo)
Description copied from class:AbstractEntityClient side: Draws this entity- Overrides:
onClientDrawEntityin classInfoEntity
-
onClientFrame
public void onClientFrame(boolean selected)
Description copied from class:AbstractEntityClient side: Callback on each frame for general logic- Overrides:
onClientFramein classAbstractEntity
-
onServerTurnPass0
public void onServerTurnPass0(GameSession gameSession)
Description copied from class:AbstractEntityServer side: Executes code on every server turn, main pass 1 of 2. Executed after composite entities pass 0- Overrides:
onServerTurnPass0in classAbstractEntity
-
getRadius
public int getRadius()
-
setRadius
public void setRadius(int radius)
-
getLabel
public String getLabel()
-
setLabel
public void setLabel(String label)
-
getCustom0
public String getCustom0()
-
setCustom0
public void setCustom0(String custom0)
-
getCustom1
public String getCustom1()
-
setCustom1
public void setCustom1(String custom1)
-
getCustom2
public String getCustom2()
-
setCustom2
public void setCustom2(String custom2)
-
getCustom3
public String getCustom3()
-
setCustom3
public void setCustom3(String custom3)
-
getCustom4
public String getCustom4()
-
setCustom4
public void setCustom4(String custom4)
-
-