Class ScriptingCompositeEntity
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.InfoCompositeEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.ScriptingCompositeEntity
-
- All Implemented Interfaces:
HasPosition2
,HasPositionAndDimension2
,SpatialIndex2Capable
public class ScriptingCompositeEntity extends InfoCompositeEntity
ScriptingCompositeEntity is a container for scripts deriving from AbstractScriptingEntity. This allows placing scripts in the game world, for example spawning with a certain scene or being triggered when a ship enters a certain range.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
AbstractCompositeEntity.CollisionCalculationResult, AbstractCompositeEntity.DefaultDamageWaveDamageHandler
-
-
Field Summary
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
accelerationVector, DAMAGE_COLORS, DAMAGE_CONSUMER_BOTH, DAMAGE_CONSUMER_ENTITY, DAMAGE_CONSUMER_SHIELD, DAMAGEWAVE_DIRECTIONS, dimension, dirty, entityManager, fields, fresh, lastMovement, LOGGER, meshes, position, positionDirty, precisePosition, prevPosition, prevVelocityVector, ROTATE_COLLISION_COLOR, splitEntityGroups, sumMassCached, sumMassCachedTurn, uuid, velocityVector, VMAX_M_LB, VMAX_M_UB, VMAX_VEL_MAX, VMAX_VEL_MIN, VMAX_VEL_VAR
-
-
Constructor Summary
Constructors Constructor Description ScriptingCompositeEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getDynamicSerializationProperties(boolean incremental, UUID recipient)
Dynamic serialization properties are created when transferring data from server to client (or vice versa) as well as when persisting a composite to disk.String
getEditorEntityClassName()
void
localCopy(AbstractCompositeEntity other)
Local copy of all fields that are not covered by update()void
localInit(EntityManager entityManager)
Local initialization of transient fields.void
setDynamicSerializationProperties(Map<String,Object> properties)
This is the counterpart of getDynamicSerializationProperties(), see the description there.void
setEditorEntityClassName(String editorEntityClassName)
<T extends AbstractScriptingEntity>
Tsetup(Class<T> clazz)
<T extends InfoEntity>
Tsetup(Class<T> clazz, Class<? extends AbstractEntityDef> entityDefType)
DefaultScriptingEntity
setup(String editorEntityClassName)
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.builtin.composite.InfoCompositeEntity
accelerate, damageWave, getInfoEntityCached, getInfoTypeCached, handleMove, onServerCollision, sumMass
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
calculateCollision, calculateVMax, compressDimension, create, excludeDynamicSerializationPropertiesPermanentStorage, getAccelerationVector, getAnimationOffset, getCompositeEntityFactoryClassName, getDimension, getDynamicSerializationPropertiesForSeparateTransfer, getEntityManager, getEntityNetworkConsolesCache, getFields, getLastEdited, getLastRotation, getLastRotationDirection, getMeshes, getPosition, getPrecisePosition, getPrevPosition, getSceneTag, getServerFieldsLastPublished, getServerLastInViewPort, getServerMeshesLastPublished, getServerScannedBy, getUuid, getVelocityVector, handleMoveApply, includeInSpatialIndex2ResultSet, isDirty, isFresh, isInSpatialIndex2ResultSet, isLocalInit, isPositionDirty, isRemoved, isShadowed, isSplitEntityGroups, onClientActionMessage, onClientDraw, onClientFrame, onRemove, onServerActionMessage, onServerTurnPass0, onServerTurnPass1, onServerTurnPass2, priorityCalculateCollision, resetFieldsForPermanentStorage, resetStatic, restoreFieldsFromPermanentStorage, rotate, setAccelerationVector, setCompositeEntityFactoryClassName, setDimension, setDirty, setEntityManager, setFresh, setLastEdited, setPosition, setPositionDirty, setPrecisePosition, setPrevPosition, setSceneTag, setServerFieldsLastPublished, setServerMeshesLastPublished, setShadowed, setSplitEntityGroups, setUuid, setVelocityVector, splitEntityGroups, update
-
-
-
-
Method Detail
-
localInit
public void localInit(EntityManager entityManager)
Description copied from class:AbstractCompositeEntity
Local initialization of transient fields. See also create() and update()- Overrides:
localInit
in classInfoCompositeEntity
-
localCopy
public void localCopy(AbstractCompositeEntity other)
Description copied from class:AbstractCompositeEntity
Local copy of all fields that are not covered by update()- Overrides:
localCopy
in classAbstractCompositeEntity
-
getDynamicSerializationProperties
public Map<String,Object> getDynamicSerializationProperties(boolean incremental, UUID recipient)
Description copied from class:AbstractCompositeEntity
Dynamic serialization properties are created when transferring data from server to client (or vice versa) as well as when persisting a composite to disk. These properties provide a way to implement complex serialization logic (i.e. views) and to distinguish between incremental and full updates.- Overrides:
getDynamicSerializationProperties
in classAbstractCompositeEntity
-
setDynamicSerializationProperties
public void setDynamicSerializationProperties(Map<String,Object> properties)
Description copied from class:AbstractCompositeEntity
This is the counterpart of getDynamicSerializationProperties(), see the description there.- Overrides:
setDynamicSerializationProperties
in classAbstractCompositeEntity
-
setup
public DefaultScriptingEntity setup(String editorEntityClassName)
-
setup
public <T extends AbstractScriptingEntity> T setup(Class<T> clazz)
-
setup
public <T extends InfoEntity> T setup(Class<T> clazz, Class<? extends AbstractEntityDef> entityDefType)
- Overrides:
setup
in classInfoCompositeEntity
-
getEditorEntityClassName
public String getEditorEntityClassName()
-
setEditorEntityClassName
public void setEditorEntityClassName(String editorEntityClassName)
-
-