|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefenseUtils
public class DefenseUtils
Contains methods to make working with a ship's armor grid and defenses easier.
Field Summary | |
---|---|
static float |
NOT_IN_GRID
A constant that represents a point not in a ship's armor grid. |
Method Summary | |
---|---|
static Vector2f |
getArmorCellAtWorldCoord(ShipAPI ship,
Vector2f loc)
Deprecated. Use ArmorGridAPI.getCellAtLocation(Vector2f) instead. |
static float |
getArmorDamage(ShipAPI ship,
Vector2f loc)
Get the total damage taken by a ShipAPI 's armor at a location. |
static float |
getArmorLevel(ShipAPI ship,
Vector2f loc)
Get the armor level of a ShipAPI at a location. |
static float |
getArmorValue(ShipAPI ship,
Vector2f loc)
Get the armor value of a ShipAPI at a location. |
static DefenseType |
getDefenseAtPoint(ShipAPI ship,
Vector2f loc)
Determine what DefenseType is present at a specific location
on a ShipAPI . |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float NOT_IN_GRID
Method Detail |
---|
public static float getArmorValue(ShipAPI ship, Vector2f loc)
ShipAPI
at a location. Equivalent
to ArmorGridAPI.getArmorValue(int, int)
, but using
world-space coordinates.
ship
- The ShipAPI
whose ArmorGridAPI
we will use.loc
- The world location we will be checking the armor value at.
loc
, or
NOT_IN_GRID
if the point isn't within ship
's ArmorGridAPI
.
public static float getArmorDamage(ShipAPI ship, Vector2f loc)
ShipAPI
's armor at a location.
ship
- The ShipAPI
whose ArmorGridAPI
we will use.loc
- The world location we will be checking the armor damage at.
loc
, or
NOT_IN_GRID
if the point isn't within
ship
's ArmorGridAPI
.
public static float getArmorLevel(ShipAPI ship, Vector2f loc)
ShipAPI
at a location. Equivalent
to ArmorGridAPI.getArmorFraction(int, int)
, but using
world-space coordinates.
ship
- The ShipAPI
whose ArmorGridAPI
we will use.loc
- The world location we will be checking the armor level at.
loc
, or
NOT_IN_GRID
if the point isn't within ship
's ArmorGridAPI
.
public static DefenseType getDefenseAtPoint(ShipAPI ship, Vector2f loc)
DefenseType
is present at a specific location
on a ShipAPI
.
ship
- The ShipAPI
to examine.loc
- The location to check at.
DefenseType
present at loc
.
@Deprecated public static Vector2f getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
ArmorGridAPI.getCellAtLocation(Vector2f)
instead.
|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |