public class AnchoredEntity extends Object
CombatEntityAPI
that follows and rotates
with another anchoring CombatEntityAPI
.Modifier and Type | Field and Description |
---|---|
protected CombatEntityAPI |
anchor |
protected float |
relativeAngle |
protected float |
relativeDistance |
Constructor and Description |
---|
AnchoredEntity(CombatEntityAPI anchor,
Vector2f location)
Creates a
CombatEntityAPI that follows and rotates with another
anchoring CombatEntityAPI . |
Modifier and Type | Method and Description |
---|---|
Object |
getAI()
NONFUNCTIONAL/PLACEHOLDER
|
CombatEntityAPI |
getAnchor()
Returns the
CombatEntityAPI this entity is anchored to. |
float |
getAngularVelocity()
NONFUNCTIONAL/PLACEHOLDER
|
CollisionClass |
getCollisionClass()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getCollisionRadius()
NONFUNCTIONAL/PLACEHOLDER
|
Map<String,Object> |
getCustomData()
NONFUNCTIONAL/PLACEHOLDER
|
BoundsAPI |
getExactBounds()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getFacing()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getHitpoints()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getHullLevel()
NONFUNCTIONAL/PLACEHOLDER
|
Vector2f |
getLocation()
Returns the location of this entity, calculated to be relative to
its anchor.
|
float |
getMass()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getMaxHitpoints()
NONFUNCTIONAL/PLACEHOLDER
|
int |
getOwner()
NONFUNCTIONAL/PLACEHOLDER
|
ShieldAPI |
getShield()
NONFUNCTIONAL/PLACEHOLDER
|
Vector2f |
getVelocity()
Returns the velocity of this entity's anchor (and by definition this entity's velocity as well).
|
boolean |
isExpired()
NONFUNCTIONAL/PLACEHOLDER
|
void |
reanchor(CombatEntityAPI newAnchor,
Vector2f newLocation)
Reorient this entity around a new anchor.
|
void |
removeCustomData(String s)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setAngularVelocity(float angVel)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setCollisionClass(CollisionClass collisionClass)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setCollisionRadius(float arg0)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setCustomData(String s,
Object o)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setFacing(float facing)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setHitpoints(float hitpoints)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setMass(float mass)
NONFUNCTIONAL/PLACEHOLDER
|
void |
setOwner(int owner)
NONFUNCTIONAL/PLACEHOLDER
|
protected CombatEntityAPI anchor
protected float relativeDistance
protected float relativeAngle
public AnchoredEntity(CombatEntityAPI anchor, Vector2f location)
CombatEntityAPI
that follows and rotates with another
anchoring CombatEntityAPI
.anchor
- The CombatEntityAPI
to follow and rotate with.location
- The location relative to anchor
to track.public void reanchor(CombatEntityAPI newAnchor, Vector2f newLocation)
newAnchor
- The CombatEntityAPI
to follow and rotate with.newLocation
- The location relative to anchor
to track.public Vector2f getLocation()
getLocation
in interface CombatEntityAPI
public Vector2f getVelocity()
getVelocity
in interface CombatEntityAPI
public CombatEntityAPI getAnchor()
CombatEntityAPI
this entity is anchored to.CombatEntityAPI
this entity is anchored to.public float getFacing()
getFacing
in interface CombatEntityAPI
public void setFacing(float facing)
setFacing
in interface CombatEntityAPI
public float getAngularVelocity()
getAngularVelocity
in interface CombatEntityAPI
public void setAngularVelocity(float angVel)
setAngularVelocity
in interface CombatEntityAPI
public int getOwner()
getOwner
in interface CombatEntityAPI
public void setOwner(int owner)
setOwner
in interface CombatEntityAPI
public float getCollisionRadius()
getCollisionRadius
in interface CombatEntityAPI
public CollisionClass getCollisionClass()
getCollisionClass
in interface CombatEntityAPI
public void setCollisionClass(CollisionClass collisionClass)
setCollisionClass
in interface CombatEntityAPI
public float getMass()
getMass
in interface CombatEntityAPI
public void setMass(float mass)
setMass
in interface CombatEntityAPI
public BoundsAPI getExactBounds()
getExactBounds
in interface CombatEntityAPI
public ShieldAPI getShield()
getShield
in interface CombatEntityAPI
public float getHullLevel()
getHullLevel
in interface CombatEntityAPI
public float getHitpoints()
getHitpoints
in interface CombatEntityAPI
public float getMaxHitpoints()
getMaxHitpoints
in interface CombatEntityAPI
public void setCollisionRadius(float arg0)
setCollisionRadius
in interface CombatEntityAPI
public Object getAI()
getAI
in interface CombatEntityAPI
public boolean isExpired()
isExpired
in interface CombatEntityAPI
public void setCustomData(String s, Object o)
setCustomData
in interface CombatEntityAPI
public void removeCustomData(String s)
removeCustomData
in interface CombatEntityAPI
public Map<String,Object> getCustomData()
getCustomData
in interface CombatEntityAPI
public void setHitpoints(float hitpoints)
setHitpoints
in interface CombatEntityAPI