Class SimpleEntity
Object
SimpleEntity
- All Implemented Interfaces:
CombatEntityAPI
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.- Since:
- 1.4
- Author:
- LazyWizard
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ShipEngineControllerAPI.ShipEngineAPIprotected Vector2fprotected final SimpleEntity.SimpleEntityTypeprotected WeaponAPI -
Constructor Summary
ConstructorsConstructorDescriptionCreates aCombatEntityAPIthat mimics the location of aShipEngineControllerAPI.ShipEngineAPI.SimpleEntity(WeaponAPI weapon) Creates aCombatEntityAPIthat mimics the location of aWeaponAPI.SimpleEntity(Vector2f location) Creates aCombatEntityAPIthat stays in a single, predefined location. -
Method Summary
Modifier and TypeMethodDescriptiongetAI()NONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERReturns theShipEngineControllerAPI.ShipEngineAPIthis entity is attached to, if any.NONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERReturns the location thisSimpleEntityis mimicking.floatgetMass()NONFUNCTIONAL/PLACEHOLDERfloatNONFUNCTIONAL/PLACEHOLDERintgetOwner()NONFUNCTIONAL/PLACEHOLDERNONFUNCTIONAL/PLACEHOLDERgetType()Returns theSimpleEntity.SimpleEntityTypecorresponding to the constructor used to create this object.NONFUNCTIONAL/PLACEHOLDERReturns theWeaponAPIthis entity is attached to, if any.booleanNONFUNCTIONAL/PLACEHOLDERbooleanNONFUNCTIONAL/PLACEHOLDERvoidNONFUNCTIONAL/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
-
type
-
location
-
weapon
-
engine
-
-
Constructor Details
-
SimpleEntity
Creates aCombatEntityAPIthat stays in a single, predefined location. This version is a simple wrapper around aVector2fand costs virtually nothing.- Parameters:
location- TheVector2fthat getLocation() should return.- Since:
- 1.4
-
SimpleEntity
Creates aCombatEntityAPIthat mimics the location of aWeaponAPI.- Parameters:
weapon- TheWeaponAPIwhose location getLocation() should return.- Since:
- 1.7
-
SimpleEntity
Creates aCombatEntityAPIthat mimics the location of aShipEngineControllerAPI.ShipEngineAPI.- Parameters:
engine- TheShipEngineControllerAPI.ShipEngineAPIwhose location getLocation() should return.- Since:
- 1.9b
-
-
Method Details
-
getLocation
Returns the location thisSimpleEntityis mimicking.- Specified by:
getLocationin interfaceCombatEntityAPI- Returns:
- The
Vector2fpassed in at creation or the result of getLocation() on the followedObject, depending on which constructor was used. Can returnnullif the object it is following is no longer on the battle map. - Since:
- 1.4
-
getWeapon
Returns theWeaponAPIthis entity is attached to, if any.- Returns:
- The
WeaponAPIpassed into the constructor, ornullif another constructor was used. - Since:
- 1.7
-
getEngine
Returns theShipEngineControllerAPI.ShipEngineAPIthis entity is attached to, if any.- Returns:
- The
ShipEngineControllerAPI.ShipEngineAPIpassed into the constructor, ornullif another constructor was used. - Since:
- 1.9b
-
getType
Returns theSimpleEntity.SimpleEntityTypecorresponding to the constructor used to create this object.- Returns:
- The type of constructor used to create this entity.
- Since:
- 1.7
-
getVelocity
NONFUNCTIONAL/PLACEHOLDER- Specified by:
getVelocityin interfaceCombatEntityAPI
-
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
-