Class RestrictedEntity
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.live.RestrictedEntity
-
- All Implemented Interfaces:
HasPosition2
,HasPositionAndDimension2
public class RestrictedEntity extends AbstractEntity
-
-
Field Summary
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
LOGGER, serverRestrictedEntities, serverRestrictedEntitySurfaceBo
-
-
Constructor Summary
Constructors Constructor Description RestrictedEntity()
-
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).EntityLayer
getAlternativeEntityLayer()
String
getAlternativeTilesetModName()
String
getAlternativeTilesetName()
CoordI2
getAlternativeTilesetPosition()
EntityLayer
getEntityLayer()
double
getHealthCur()
double
getHealthTotal()
int
getServerLastTurnUsed()
int
getShieldFieldColorB()
int
getShieldFieldColorG()
int
getShieldFieldColorR()
int
getShieldFieldEffectCorner()
int
getShieldFieldPlateau()
int
getTileset()
CoordI2
getTilesetPosition()
void
onClientDrawEntity(List<RenderingBo> renderingBo)
Client side: Draws this entityboolean
serverRestrictEntity(UUID recipient, AbstractCompositeEntity parent, GameSession gameSession)
Server side: Checks whether this entity should be restricted to the player recipient, i.e.void
setAlternativeEntityLayer(EntityLayer alternativeEntityLayer)
void
setAlternativeTilesetModName(String alternativeTilesetModName)
void
setAlternativeTilesetName(String alternativeTilesetName)
void
setAlternativeTilesetPosition(CoordI2 alternativeTilesetPosition)
void
setHealthCur(double healthCur)
void
setHealthTotal(double healthTotal)
void
setServerLastTurnUsed(int serverLastTurnUsed)
void
setShieldFieldColorB(int shieldFieldColorB)
void
setShieldFieldColorG(int shieldFieldColorG)
void
setShieldFieldColorR(int shieldFieldColorR)
void
setShieldFieldEffectCorner(int shieldFieldEffectCorner)
void
setShieldFieldPlateau(int shieldFieldPlateau)
void
update(AbstractEntity other)
Incremental update of non-transient fields (usually transferred from server)-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractEntity
createClientDrawTileImageBo, getDimension, getEntityDef, getEntityDefUUID, getEntityManager, getOrientation, getParentCompositeEntity, getPosition, getServerRestrictedEntities, getServerRestrictEntitiesLastUpdate, getServerRestrictEntitiesWalls, getUuid, isDirty, isLocalInit, localCopy, localInit, onClientAction, onClientActionMessage, onClientFrame, onClientGenerateEntityDetails, onClientSelectedPointToEntity, onClientSelectedPointToNoClientEntityAction, onClientSelectedPointToWorldPos, onServerActionMessage, onServerTurnPass0, onServerTurnPass1, onServerTurnPass2PostComposites, serverCleanupRestrictedEntities, serverPrepareRestrictedEntities, serverTranslateEntityPass0, serverTranslateEntityPass1, setClientActions, 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 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 classAbstractEntity
-
serverRestrictEntity
public boolean serverRestrictEntity(UUID recipient, AbstractCompositeEntity parent, GameSession gameSession)
Description copied from class:AbstractEntity
Server side: Checks whether this entity should be restricted to the player recipient, i.e. details about this entity (state, ...) are sent to this player or not. See also RestrictedEntitySurface- Overrides:
serverRestrictEntity
in classAbstractEntity
-
getTileset
public int getTileset()
- Overrides:
getTileset
in classAbstractEntity
-
getTilesetPosition
public CoordI2 getTilesetPosition()
- Overrides:
getTilesetPosition
in classAbstractEntity
-
getEntityLayer
public EntityLayer getEntityLayer()
- Overrides:
getEntityLayer
in classAbstractEntity
-
getAlternativeTilesetPosition
public CoordI2 getAlternativeTilesetPosition()
-
setAlternativeTilesetPosition
public void setAlternativeTilesetPosition(CoordI2 alternativeTilesetPosition)
-
getHealthCur
public double getHealthCur()
-
setHealthCur
public void setHealthCur(double healthCur)
-
getHealthTotal
public double getHealthTotal()
-
setHealthTotal
public void setHealthTotal(double healthTotal)
-
getShieldFieldPlateau
public int getShieldFieldPlateau()
-
setShieldFieldPlateau
public void setShieldFieldPlateau(int shieldFieldPlateau)
-
getShieldFieldColorR
public int getShieldFieldColorR()
-
setShieldFieldColorR
public void setShieldFieldColorR(int shieldFieldColorR)
-
getShieldFieldColorG
public int getShieldFieldColorG()
-
setShieldFieldColorG
public void setShieldFieldColorG(int shieldFieldColorG)
-
getShieldFieldColorB
public int getShieldFieldColorB()
-
setShieldFieldColorB
public void setShieldFieldColorB(int shieldFieldColorB)
-
getServerLastTurnUsed
public int getServerLastTurnUsed()
-
setServerLastTurnUsed
public void setServerLastTurnUsed(int serverLastTurnUsed)
-
getAlternativeTilesetModName
public String getAlternativeTilesetModName()
-
setAlternativeTilesetModName
public void setAlternativeTilesetModName(String alternativeTilesetModName)
-
getAlternativeTilesetName
public String getAlternativeTilesetName()
-
setAlternativeTilesetName
public void setAlternativeTilesetName(String alternativeTilesetName)
-
getAlternativeEntityLayer
public EntityLayer getAlternativeEntityLayer()
-
setAlternativeEntityLayer
public void setAlternativeEntityLayer(EntityLayer alternativeEntityLayer)
-
getShieldFieldEffectCorner
public int getShieldFieldEffectCorner()
-
setShieldFieldEffectCorner
public void setShieldFieldEffectCorner(int shieldFieldEffectCorner)
-
-