public class SimpleEntity extends Object
CombatEntityAPI
, mostly useful for
decorative EMP arc targeting. These entities do not actually exist on the
battle map, so most other methods that take a CombatEntityAPI
will
fail if you use one of these as a parameter.Modifier and Type | Class and Description |
---|---|
static class |
SimpleEntity.SimpleEntityType |
Modifier and Type | Field and Description |
---|---|
protected ShipEngineControllerAPI.ShipEngineAPI |
engine |
protected Vector2f |
location |
protected SimpleEntity.SimpleEntityType |
type |
protected WeaponAPI |
weapon |
Constructor and Description |
---|
SimpleEntity(ShipEngineControllerAPI.ShipEngineAPI engine)
Creates a
CombatEntityAPI that mimics the location of a
ShipEngineControllerAPI.ShipEngineAPI . |
SimpleEntity(Vector2f location)
Creates a
CombatEntityAPI that stays in a single, predefined
location. |
SimpleEntity(WeaponAPI weapon)
Creates a
CombatEntityAPI that mimics the location of a
WeaponAPI . |
Modifier and Type | Method and Description |
---|---|
Object |
getAI()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getAngularVelocity()
NONFUNCTIONAL/PLACEHOLDER
|
CollisionClass |
getCollisionClass()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getCollisionRadius()
NONFUNCTIONAL/PLACEHOLDER
|
Map<String,Object> |
getCustomData()
NONFUNCTIONAL/PLACEHOLDER
|
@Nullable ShipEngineControllerAPI.ShipEngineAPI |
getEngine()
Returns the
ShipEngineControllerAPI.ShipEngineAPI this entity is attached to, if any. |
BoundsAPI |
getExactBounds()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getFacing()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getHitpoints()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getHullLevel()
NONFUNCTIONAL/PLACEHOLDER
|
Vector2f |
getLocation()
Returns the location this
SimpleEntity is mimicking. |
float |
getMass()
NONFUNCTIONAL/PLACEHOLDER
|
float |
getMaxHitpoints()
NONFUNCTIONAL/PLACEHOLDER
|
int |
getOwner()
NONFUNCTIONAL/PLACEHOLDER
|
ShieldAPI |
getShield()
NONFUNCTIONAL/PLACEHOLDER
|
SimpleEntity.SimpleEntityType |
getType()
Returns the
SimpleEntity.SimpleEntityType corresponding to the constructor
used to create this object. |
Vector2f |
getVelocity()
NONFUNCTIONAL/PLACEHOLDER
|
@Nullable WeaponAPI |
getWeapon()
Returns the
WeaponAPI this entity is attached to, if any. |
boolean |
isExpired()
NONFUNCTIONAL/PLACEHOLDER
|
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 final SimpleEntity.SimpleEntityType type
protected Vector2f location
protected WeaponAPI weapon
protected ShipEngineControllerAPI.ShipEngineAPI engine
public SimpleEntity(Vector2f location)
CombatEntityAPI
that stays in a single, predefined
location. This version is a simple wrapper around a Vector2f
and costs virtually nothing.location
- The Vector2f
that getLocation() should return.public SimpleEntity(WeaponAPI weapon)
CombatEntityAPI
that mimics the location of a
WeaponAPI
.weapon
- The WeaponAPI
whose location getLocation() should
return.public SimpleEntity(ShipEngineControllerAPI.ShipEngineAPI engine)
CombatEntityAPI
that mimics the location of a
ShipEngineControllerAPI.ShipEngineAPI
.engine
- The ShipEngineControllerAPI.ShipEngineAPI
whose location getLocation()
should return.public Vector2f getLocation()
SimpleEntity
is mimicking.getLocation
in interface CombatEntityAPI
Vector2f
passed in at creation or the result of
getLocation() on the followed Object
, depending on which
constructor was used. Can return null
if the object it
is following is no longer on the battle map.@Nullable public @Nullable WeaponAPI getWeapon()
WeaponAPI
this entity is attached to, if any.WeaponAPI
passed into the constructor, or
null
if another constructor was used.@Nullable public @Nullable ShipEngineControllerAPI.ShipEngineAPI getEngine()
ShipEngineControllerAPI.ShipEngineAPI
this entity is attached to, if any.ShipEngineControllerAPI.ShipEngineAPI
passed into the constructor, or
null
if another constructor was used.public SimpleEntity.SimpleEntityType getType()
SimpleEntity.SimpleEntityType
corresponding to the constructor
used to create this object.public Vector2f getVelocity()
getVelocity
in interface CombatEntityAPI
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