public class DefenseUtils
extends Object
Modifier and Type | Field and Description |
---|---|
static float |
NOT_IN_GRID
A constant that represents a point not in a ship's armor grid.
|
Modifier and Type | Method and Description |
---|---|
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 . |
public static final float NOT_IN_GRID
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.