Package megamek.client.ui.tileset
Class EntityImage
java.lang.Object
megamek.client.ui.tileset.EntityImage
- Direct Known Subclasses:
FighterSquadronIcon
Handles the rotated and damaged and preview images for a unit.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntityImage
(Image base, Image wreck, Camouflage camouflage, Component comp, Entity entity, int secondaryPos) EntityImage
(Image base, Image wreck, Camouflage camouflage, Component comp, Entity entity, int secondaryPos, boolean preview, boolean withShadows) EntityImage
(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos, boolean preview, boolean withShadows) EntityImage
(Image base, Camouflage camouflage, Component comp, Entity entity) -
Method Summary
Modifier and TypeMethodDescriptionprotected Image
applyColor
(Image image, int facing) Applies the unit individual or player camouflage to the icon.protected Image
applyDropShadow
(Image image) static EntityImage
createIcon
(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos) static EntityImage
createIcon
(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos, boolean preview, boolean withShadows) static EntityImage
createIcon
(Image base, Camouflage camouflage, Entity entity) static EntityImage
createIcon
(Image base, Camouflage camouflage, Entity entity, boolean withShadows) static EntityImage
createLobbyIcon
(Image base, Camouflage camouflage, Entity entity) getBase()
int
getFacing
(int facing) getIcon()
getWreckFacing
(int facing) void
Creates images applying damage decals, rotating and scaling.loadPreviewImage
(boolean showDamage) protected BufferedImage
rotateImage
(Image img, int dir) Rotates a given unit image into direction dir.void
setCamouflage
(Camouflage camouflage)
-
Field Details
-
base
The base (unit) image used for this icon. -
icon
A smaller icon used for the unit overview. -
facings
-
-
Constructor Details
-
EntityImage
-
EntityImage
public EntityImage(Image base, Image wreck, Camouflage camouflage, Component comp, Entity entity, int secondaryPos) -
EntityImage
public EntityImage(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos, boolean preview, boolean withShadows) -
EntityImage
public EntityImage(Image base, Image wreck, Camouflage camouflage, Component comp, Entity entity, int secondaryPos, boolean preview, boolean withShadows)
-
-
Method Details
-
createIcon
-
createIcon
public static EntityImage createIcon(Image base, Camouflage camouflage, Entity entity, boolean withShadows) -
createLobbyIcon
-
createIcon
public static EntityImage createIcon(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos) -
createIcon
public static EntityImage createIcon(Image base, Image wreck, Camouflage camouflage, Entity entity, int secondaryPos, boolean preview, boolean withShadows) -
getCamouflage
-
setCamouflage
-
getDmgLvl
public int getDmgLvl() -
loadFacings
public void loadFacings()Creates images applying damage decals, rotating and scaling. -
rotateImage
Rotates a given unit image into direction dir. -
getFacing
-
getWreckFacing
-
getBase
-
getIcon
-
loadPreviewImage
-
applyColor
Applies the unit individual or player camouflage to the icon. -
applyDropShadow
-