Class AbstractMeshEntity
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.live.PhysicalEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.live.AbstractMeshEntity
-
- All Implemented Interfaces:
MeshEntity
,HasPosition2
,HasPositionAndDimension2
public abstract class AbstractMeshEntity extends PhysicalEntity implements MeshEntity
-
-
Field Summary
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.builtin.live.PhysicalEntity
clientEntityActionQueue, clientPoseAnimation, clientPoseTilesetPosition, enabled, entityAction, entityActionPending, entityActionPendingTurn, entityActionPlayer, entityActionTarget, entityActionTargetCoord, health, loggedInEntity, onDamageDestroyImmediately, onDamageSplit, onDamageSplitThreshold, pathFindingEntitySupport
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
LOGGER, serverRestrictedEntities, serverRestrictedEntitySurfaceBo
-
-
Constructor Summary
Constructors Constructor Description AbstractMeshEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(UUID uuid, AbstractEntityDef entityDef, int entityDefIdx, UUID parentCompositeEntity)
Central initialization of non-transient fields (usually on server side).int
getMeshConnectors()
int
getMeshLane()
int
getMeshLanePrev()
UUID
getMeshType()
void
localCopy(AbstractEntity other)
Local copy of transient fieldsvoid
localInit(AbstractEntityDef entityDef)
Local initialization of transient fieldsvoid
onServerTurnPass2PostComposites(GameSession gameSession)
Server side: Executes code on every server turn, postprocessing pass after composite entity pass 2.void
serverTranslateEntityPass0(Edge2 rotation, CoordI2 posSrc, CoordI2 origDim, AbstractCompositeEntity parent, GameSession gameSession)
Server side: Parent composite entity is rotated, rotates this entityvoid
setHealth(double health)
Sets the health of this entity.void
setMeshConnectors(int meshConnectors)
void
setMeshLane(int meshLane)
void
setMeshLanePrev(int meshLanePrev)
void
setMeshType(UUID meshType)
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.PhysicalEntity
enableEntity, getEntityAction, getEntityActionPending, getEntityActionTarget, getEntityActionTargetCoord, getHealth, getLoggedInEntity, getOnDamageSplitThreshold, getPathFindingEntitySupport, getSubTileOffset, getTilesetPosition, handleEnabledState, isEnabled, isOnDamageDestroyImmediately, isOnDamageSplit, isOperational, nextClientEntityAction, onClientAction, onClientActionMessage, onClientComplexConsoleControlEvent, onClientComplexConsoleControlEvent, onClientDamage, onClientDrawConsoleControls, onClientDrawEntity, onClientDrawEntityAction, onClientDrawEntityActions, onClientFrame, onClientGenerateEntityDetails, onClientSelectedPointToEntity, onClientSelectedPointToNoClientEntityAction, onServerActionMessage, onServerConsoleControlEvent, onServerDamage, onServerTurnPass0, onServerTurnPass1, serverAbortEntityAction, serverCalculateEmEmission, serverSetEntityAction, serverSplitOnDamage, serverTranslateEntityPass1, setClientActions, setEnabled, setLoggedInEntity, setOnDamageDestroyImmediately, setOnDamageSplit, setOnDamageSplitThreshold
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
createClientDrawTileImageBo, getDimension, getEntityDef, getEntityDefUUID, getEntityLayer, getEntityManager, getOrientation, getParentCompositeEntity, getPosition, getServerRestrictedEntities, getServerRestrictEntitiesLastUpdate, getServerRestrictEntitiesWalls, getTileset, getUuid, isDirty, isLocalInit, onClientSelectedPointToWorldPos, serverCleanupRestrictedEntities, serverPrepareRestrictedEntities, serverRestrictEntity, setDirty, setEntityDef, setEntityManager, setLocalInit, setOrientation, setParentCompositeEntity, setPosition, setServerRestrictedEntities, setServerRestrictEntitiesLastUpdate, setServerRestrictEntitiesWalls, setUuid
-
-
-
-
Method Detail
-
create
public void create(UUID uuid, AbstractEntityDef entityDef, int entityDefIdx, UUID parentCompositeEntity)
Description copied from class:AbstractEntity
Central initialization of non-transient fields (usually on server side). Is only called once in the whole life cycle of an entity.- Overrides:
create
in classPhysicalEntity
-
localInit
public void localInit(AbstractEntityDef entityDef)
Description copied from class:AbstractEntity
Local initialization of transient fields- Overrides:
localInit
in classPhysicalEntity
-
localCopy
public void localCopy(AbstractEntity other)
Description copied from class:AbstractEntity
Local copy of transient fields- Overrides:
localCopy
in classPhysicalEntity
-
update
public void update(AbstractEntity other)
Description copied from class:AbstractEntity
Incremental update of non-transient fields (usually transferred from server)- Overrides:
update
in classPhysicalEntity
-
serverTranslateEntityPass0
public void serverTranslateEntityPass0(Edge2 rotation, CoordI2 posSrc, CoordI2 origDim, AbstractCompositeEntity parent, GameSession gameSession)
Description copied from class:AbstractEntity
Server side: Parent composite entity is rotated, rotates this entity- Overrides:
serverTranslateEntityPass0
in classAbstractEntity
-
onServerTurnPass2PostComposites
public void onServerTurnPass2PostComposites(GameSession gameSession)
Description copied from class:AbstractEntity
Server side: Executes code on every server turn, postprocessing pass after composite entity pass 2. It is highly recommended to not change the main business state here but only do calculations based on that state- Overrides:
onServerTurnPass2PostComposites
in classAbstractEntity
-
setHealth
public void setHealth(double health)
Description copied from class:PhysicalEntity
Sets the health of this entity. Setting health 0.0 means the entity has been destroyed- Overrides:
setHealth
in classPhysicalEntity
-
getMeshLane
public int getMeshLane()
- Specified by:
getMeshLane
in interfaceMeshEntity
-
setMeshLane
public void setMeshLane(int meshLane)
- Specified by:
setMeshLane
in interfaceMeshEntity
-
getMeshConnectors
public int getMeshConnectors()
- Specified by:
getMeshConnectors
in interfaceMeshEntity
-
setMeshConnectors
public void setMeshConnectors(int meshConnectors)
- Specified by:
setMeshConnectors
in interfaceMeshEntity
-
getMeshLanePrev
public int getMeshLanePrev()
- Specified by:
getMeshLanePrev
in interfaceMeshEntity
-
setMeshLanePrev
public void setMeshLanePrev(int meshLanePrev)
- Specified by:
setMeshLanePrev
in interfaceMeshEntity
-
getMeshType
public UUID getMeshType()
- Specified by:
getMeshType
in interfaceMeshEntity
-
setMeshType
public void setMeshType(UUID meshType)
- Specified by:
setMeshType
in interfaceMeshEntity
-
-