|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSimpleEntity
public class SimpleEntity
A bare-bones implementation of 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.
Nested Class Summary | |
---|---|
static class |
SimpleEntity.SimpleEntityType
|
Constructor Summary | |
---|---|
SimpleEntity(Object toFollow)
Creates a CombatEntityAPI that mimics the location of another
object that contains a getLocation() method. |
|
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 . |
Method Summary | |
---|---|
float |
getAngularVelocity()
NONFUNCTIONAL/PLACEHOLDER |
CollisionClass |
getCollisionClass()
NONFUNCTIONAL/PLACEHOLDER |
float |
getCollisionRadius()
NONFUNCTIONAL/PLACEHOLDER |
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 |
WeaponAPI |
getWeapon()
Returns the WeaponAPI this entity is attached to, if any. |
void |
setAngularVelocity(float angVel)
NONFUNCTIONAL/PLACEHOLDER |
void |
setCollisionClass(CollisionClass collisionClass)
NONFUNCTIONAL/PLACEHOLDER |
void |
setFacing(float facing)
NONFUNCTIONAL/PLACEHOLDER |
void |
setMass(float mass)
NONFUNCTIONAL/PLACEHOLDER |
void |
setOwner(int owner)
NONFUNCTIONAL/PLACEHOLDER |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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(Object toFollow)
CombatEntityAPI
that mimics the location of another
object that contains a getLocation() method.
toFollow
- The Object
to mimic the location of. This object
MUST have the method getLocation(), which MUST return a
Vector2f
!
Method Detail |
---|
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.
public WeaponAPI getWeapon()
WeaponAPI
this entity is attached to, if any.
WeaponAPI
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
|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |