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 String
custom0
protected String
custom1
protected String
custom2
protected String
custom3
protected String
custom4
protected int
radius
-
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 String
getCustom0()
String
getCustom1()
String
getCustom2()
String
getCustom3()
String
getCustom4()
String
getLabel()
int
getRadius()
void
localInit(AbstractEntityDef entityDef)
Local initialization of transient fieldsprotected void
onClientCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity)
Client side: Called when any entity entered this.radius.protected void
onClientCompositeEntityRadiusLeft(UUID compositeEntityId)
Client side: Called when any entity left this.radius.void
onClientDrawEntity(List<RenderingBo> renderingBo)
Client side: Draws this entityvoid
onClientFrame(boolean selected)
Client side: Callback on each frame for general logicprotected void
onClientTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities)
Client side: Called on every turn, providing a list of entities currently inside radius.protected void
onServerCompositeEntityRadiusEntered(AbstractCompositeEntity compositeEntity, GameSession gameSession)
Server side: Called when any entity entered this.radius.protected void
onServerCompositeEntityRadiusLeft(UUID compositeEntityId, GameSession gameSession)
Server side: Called when any entity left this.radius.protected void
onServerTurnCompositeEntitiesInRadius(List<AbstractCompositeEntity> compositeEntities, GameSession gameSession)
Server side: Called on every turn, providing a list of entities currently inside radius.void
onServerTurnPass0(GameSession gameSession)
Server side: Executes code on every server turn, main pass 1 of 2.void
setCustom0(String custom0)
void
setCustom1(String custom1)
void
setCustom2(String custom2)
void
setCustom3(String custom3)
void
setCustom4(String custom4)
void
setLabel(String label)
void
setRadius(int radius)
void
update(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:AbstractEntity
Local initialization of transient fields- Overrides:
localInit
in classAbstractEntity
-
update
public void update(AbstractEntity other)
Description copied from class:AbstractEntity
Incremental update of non-transient fields (usually transferred from server)- Overrides:
update
in classAbstractEntity
-
onClientDrawEntity
public void onClientDrawEntity(List<RenderingBo> renderingBo)
Description copied from class:AbstractEntity
Client side: Draws this entity- Overrides:
onClientDrawEntity
in classInfoEntity
-
onClientFrame
public void onClientFrame(boolean selected)
Description copied from class:AbstractEntity
Client side: Callback on each frame for general logic- Overrides:
onClientFrame
in classAbstractEntity
-
onServerTurnPass0
public void onServerTurnPass0(GameSession gameSession)
Description copied from class:AbstractEntity
Server side: Executes code on every server turn, main pass 1 of 2. Executed after composite entities pass 0- Overrides:
onServerTurnPass0
in 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)
-
-