|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Transporter
Classes that implement this interface have the ability to load, carry, and unload units in the game. It is anticipated that classes will exist for passenger compartments, battle armor steps, Mek bays, Aerospace hangers, and vehicle garages. Other possible classes include cargo bays and Dropship docks.
| Method Summary | |
|---|---|
boolean |
canLoad(Entity unit)
Determines if this object can accept the given unit. |
int |
getCargoMpReduction()
|
Entity |
getExteriorUnitAt(int loc,
boolean isRear)
If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack. |
java.util.List<Entity> |
getExternalUnits()
|
java.util.List<Entity> |
getLoadedUnits()
Get a Vector of the units currently loaded into this
payload. |
java.lang.String |
getUnusedString()
Return a string that identifies the unused capacity of this transporter. |
boolean |
isWeaponBlockedAt(int loc,
boolean isRear)
Determine if transported units prevent a weapon in the given location from firing. |
void |
load(Entity unit)
Load the given unit. |
boolean |
unload(Entity unit)
Unload the given unit. |
| Method Detail |
|---|
boolean canLoad(Entity unit)
unit - - the Entity to be loaded.
true if the unit can be loaded, false
otherwise.
void load(Entity unit)
throws java.lang.IllegalArgumentException
unit - - the Entity to be loaded.
- - If the unit can't be loaded, an
IllegalArgumentException exception will be
thrown.
java.lang.IllegalArgumentExceptionjava.util.List<Entity> getLoadedUnits()
Vector of the units currently loaded into this
payload.
List of loaded Entity units.
This list will never be null, but it may be
empty. The returned List is independant from the
under- lying data structure; modifying one does not affect the
other.boolean unload(Entity unit)
unit - - the Entity to be unloaded.
true if the unit was contained in this space,
false otherwise.java.lang.String getUnusedString()
String meant for a human.
boolean isWeaponBlockedAt(int loc,
boolean isRear)
loc - - the int location attempting to fire.isRear - - a boolean value stating if the given
location is rear facing; if false, the
location is front facing.
true if a transported unit is in the way,
false if the weapon can fire.
Entity getExteriorUnitAt(int loc,
boolean isRear)
loc - - the int location hit by attack.isRear - - a boolean value stating if the given
location is rear facing; if false, the
location is front facing.
Entity being transported on the outside at
that location. This value will be null if no unit
is transported on the outside at that location.java.util.List<Entity> getExternalUnits()
int getCargoMpReduction()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||