Class GenericRestrictedCompositeEntity
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.GenericRestrictedCompositeEntity
-
- All Implemented Interfaces:
HasServerEntityGroupsCache
,HasPosition2
,HasPositionAndDimension2
,SpatialIndex2Capable
public class GenericRestrictedCompositeEntity extends AbstractCompositeEntity implements HasServerEntityGroupsCache
-
-
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 GenericRestrictedCompositeEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordI2
compressDimension()
Compresses the dimension of this composite.Map<EntityGroupsOptions,Matrix2<Integer>>
getServerEntityGroupsCache()
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
onServerTurnPass0(GameSession gameSession)
Server side: Called every turn to contain any logic related to this entitiy.boolean
rotate(GameSession gameSession, Edge2 direction)
Rotates this composite entity-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
accelerate, calculateCollision, calculateVMax, create, damageWave, excludeDynamicSerializationPropertiesPermanentStorage, getAccelerationVector, getAnimationOffset, getCompositeEntityFactoryClassName, getDimension, getDynamicSerializationProperties, getDynamicSerializationPropertiesForSeparateTransfer, getEntityManager, getEntityNetworkConsolesCache, getFields, getLastEdited, getLastRotation, getLastRotationDirection, getMeshes, getPosition, getPrecisePosition, getPrevPosition, getSceneTag, getServerFieldsLastPublished, getServerLastInViewPort, getServerMeshesLastPublished, getServerScannedBy, getUuid, getVelocityVector, handleMove, handleMoveApply, includeInSpatialIndex2ResultSet, isDirty, isFresh, isInSpatialIndex2ResultSet, isLocalInit, isPositionDirty, isRemoved, isShadowed, isSplitEntityGroups, onClientActionMessage, onClientDraw, onClientFrame, onRemove, onServerActionMessage, onServerCollision, onServerTurnPass1, onServerTurnPass2, priorityCalculateCollision, resetFieldsForPermanentStorage, resetStatic, restoreFieldsFromPermanentStorage, setAccelerationVector, setCompositeEntityFactoryClassName, setDimension, setDirty, setDynamicSerializationProperties, setEntityManager, setFresh, setLastEdited, setPosition, setPositionDirty, setPrecisePosition, setPrevPosition, setSceneTag, setServerFieldsLastPublished, setServerMeshesLastPublished, setShadowed, setSplitEntityGroups, setUuid, setVelocityVector, splitEntityGroups, sumMass, 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 classAbstractCompositeEntity
-
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
-
onServerTurnPass0
public void onServerTurnPass0(GameSession gameSession)
Description copied from class:AbstractCompositeEntity
Server side: Called every turn to contain any logic related to this entitiy. Pass0 is called at the beginning of the cycle before entity callbacks have been called.- Overrides:
onServerTurnPass0
in classAbstractCompositeEntity
-
rotate
public boolean rotate(GameSession gameSession, Edge2 direction)
Description copied from class:AbstractCompositeEntity
Rotates this composite entity- Overrides:
rotate
in classAbstractCompositeEntity
-
compressDimension
public CoordI2 compressDimension()
Description copied from class:AbstractCompositeEntity
Compresses the dimension of this composite. A compressed composite has no unoccupied space around it's borders.- Overrides:
compressDimension
in classAbstractCompositeEntity
-
getServerEntityGroupsCache
public Map<EntityGroupsOptions,Matrix2<Integer>> getServerEntityGroupsCache()
- Specified by:
getServerEntityGroupsCache
in interfaceHasServerEntityGroupsCache
-
-