Package megamek.common.interfaces
Interface CombatRole
- All Known Subinterfaces:
ASCardDisplayable
- All Known Implementing Classes:
AbstractBuildingEntity,Aero,AeroSpaceFighter,AlphaStrikeElement,BattleArmor,BattlefieldSupportAsset,BipedMek,BuildingEntity,CombatVehicleEscapePod,ConvFighter,ConvInfantry,Dropship,EjectedCrew,Entity,EscapePods,FighterSquadron,FixedWingSupport,GunEmplacement,HandheldWeapon,Infantry,Jumpship,LandAirMek,LargeSupportTank,Mek,MekSummary,MekWarrior,MekWithArms,MobileStructure,ProtoMek,QuadMek,QuadVee,SmallCraft,SpaceStation,SuperHeavyTank,SupportTank,SupportVTOL,Tank,TeleMissile,TripodMek,VTOL,Warship
public interface CombatRole
This interface is for classes that represent combat units with battlefield roles (Sniper, Juggernaut, Dogfighter...).
Implemented by ASCardDisplayable (= MekSummary and AlphaStrikeElement) and Entity. Implementing classes should make
sure not to use null as a UnitRole, but at least UNDETERMINED.
-
Method Summary
-
Method Details
-
getRole
UnitRole getRole()- Returns:
- The battlefield role (UnitRole) of this combat unit.
-
hasRole
default boolean hasRole()- Returns:
- True when this combat unit has a battlefield role which isn't UNDETERMINED or NONE.
-