Class AnchoredEntity
Object
AnchoredEntity
- All Implemented Interfaces:
CombatEntityAPI
An implementation of
CombatEntityAPI that follows and rotates
with another anchoring CombatEntityAPI.- Since:
- 1.5
- Author:
- LazyWizard
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnchoredEntity(CombatEntityAPI anchor, Vector2f location) Creates aCombatEntityAPIthat follows and rotates with another anchoringCombatEntityAPI. -
Method Summary
Modifier and TypeMethodDescriptiongetAI()NONFUNCTIONAL/PLACEHOLDERReturns theCombatEntityAPIthis entity is anchored to.floatNONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERReturns the location of this entity, calculated to be relative to its anchor.floatgetMass()NONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERintgetOwner()NONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERReturns the velocity of this entity's anchor (and by definition this entity's velocity as well).booleanNONFUNCTIONAL/PLACEHOLDERbooleanNONFUNCTIONAL/PLACEHOLDERvoidreanchor(CombatEntityAPI newAnchor, Vector2f newLocation) Reorient this entity around a new anchor.voidNONFUNCTIONAL/PLACEHOLDERvoidsetAngularVelocity(float angVel) NONFUNCTIONAL/PLACEHOLDERvoidsetCollisionClass(CollisionClass collisionClass) NONFUNCTIONAL/PLACEHOLDERvoidsetCollisionRadius(float arg0) NONFUNCTIONAL/PLACEHOLDERvoidsetCustomData(String s, Object o) NONFUNCTIONAL/PLACEHOLDERvoidsetFacing(float facing) NONFUNCTIONAL/PLACEHOLDERvoidsetHitpoints(float hitpoints) NONFUNCTIONAL/PLACEHOLDERvoidsetMass(float mass) NONFUNCTIONAL/PLACEHOLDERvoidsetOwner(int owner) NONFUNCTIONAL/PLACEHOLDERbooleanNONFUNCTIONAL/PLACEHOLDER
-
Field Details
-
anchor
-
relativeDistance
protected float relativeDistance -
relativeAngle
protected float relativeAngle
-
-
Constructor Details
-
AnchoredEntity
Creates aCombatEntityAPIthat follows and rotates with another anchoringCombatEntityAPI.- Parameters:
anchor- TheCombatEntityAPIto follow and rotate with.location- The location relative toanchorto track.- Since:
- 1.5
-
-
Method Details
-
reanchor
Reorient this entity around a new anchor.- Parameters:
newAnchor- TheCombatEntityAPIto follow and rotate with.newLocation- The location relative toanchorto track.- Since:
- 1.8
-
getLocation
Returns the location of this entity, calculated to be relative to its anchor.- Specified by:
getLocationin interfaceCombatEntityAPI- Returns:
- The location of this entity.
- Since:
- 1.5
-
getVelocity
Returns the velocity of this entity's anchor (and by definition this entity's velocity as well).- Specified by:
getVelocityin interfaceCombatEntityAPI- Returns:
- The velocity of this entity's anchor (a direct reference, so changes will propagate!).
- Since:
- 1.5
-
getAnchor
Returns theCombatEntityAPIthis entity is anchored to.- Returns:
- The
CombatEntityAPIthis entity is anchored to. - Since:
- 1.5
-
getFacing
public float getFacing()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getFacingin interfaceCombatEntityAPI
-
setFacing
public void setFacing(float facing) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setFacingin interfaceCombatEntityAPI
-
getAngularVelocity
public float getAngularVelocity()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getAngularVelocityin interfaceCombatEntityAPI
-
setAngularVelocity
public void setAngularVelocity(float angVel) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setAngularVelocityin interfaceCombatEntityAPI
-
getOwner
public int getOwner()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getOwnerin interfaceCombatEntityAPI
-
setOwner
public void setOwner(int owner) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setOwnerin interfaceCombatEntityAPI
-
getCollisionRadius
public float getCollisionRadius()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getCollisionRadiusin interfaceCombatEntityAPI
-
getCollisionClass
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getCollisionClassin interfaceCombatEntityAPI
-
setCollisionClass
NONFUNCTIONAL/PLACEHOLDER- Specified by:
setCollisionClassin interfaceCombatEntityAPI
-
getMass
public float getMass()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getMassin interfaceCombatEntityAPI
-
setMass
public void setMass(float mass) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setMassin interfaceCombatEntityAPI
-
getExactBounds
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getExactBoundsin interfaceCombatEntityAPI
-
getShield
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getShieldin interfaceCombatEntityAPI
-
getHullLevel
public float getHullLevel()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getHullLevelin interfaceCombatEntityAPI
-
getHitpoints
public float getHitpoints()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getHitpointsin interfaceCombatEntityAPI
-
getMaxHitpoints
public float getMaxHitpoints()NONFUNCTIONAL/PLACEHOLDER- Specified by:
getMaxHitpointsin interfaceCombatEntityAPI
-
setCollisionRadius
public void setCollisionRadius(float arg0) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setCollisionRadiusin interfaceCombatEntityAPI
-
getAI
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getAIin interfaceCombatEntityAPI
-
isExpired
public boolean isExpired()NONFUNCTIONAL/PLACEHOLDER- Specified by:
isExpiredin interfaceCombatEntityAPI
-
setCustomData
NONFUNCTIONAL/PLACEHOLDER- Specified by:
setCustomDatain interfaceCombatEntityAPI
-
removeCustomData
NONFUNCTIONAL/PLACEHOLDER- Specified by:
removeCustomDatain interfaceCombatEntityAPI
-
getCustomData
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getCustomDatain interfaceCombatEntityAPI
-
setHitpoints
public void setHitpoints(float hitpoints) NONFUNCTIONAL/PLACEHOLDER- Specified by:
setHitpointsin interfaceCombatEntityAPI
-
isPointInBounds
NONFUNCTIONAL/PLACEHOLDER- Specified by:
isPointInBoundsin interfaceCombatEntityAPI
-
wasRemoved
public boolean wasRemoved()NONFUNCTIONAL/PLACEHOLDER- Specified by:
wasRemovedin interfaceCombatEntityAPI
-