Package megamek.common.units
Class EntityVisibilityUtils
java.lang.Object
megamek.common.units.EntityVisibilityUtils
Class containing static functions that perform visibility computations related to an entity without the need to be a
part of the Entity class itself.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandetectedOrHasVisual(Player localPlayer, Game game, Entity entity) Logic lifted from BoardView1.redrawEntity() that checks whether the given player playing the given game can see the given entity.static booleanonlyDetectedBySensors(Player localPlayer, Entity entity) Used to determine if this entity is only detected by an enemies sensors and hence should only be a sensor return.static booleantrackThisEntitiesVisibilityInfo(Player localPlayer, Entity e) We only want to show double-blind visibility indicators on our own meks and teammates meks (assuming team vision option).
-
Constructor Details
-
EntityVisibilityUtils
public EntityVisibilityUtils()
-
-
Method Details
-
detectedOrHasVisual
Logic lifted from BoardView1.redrawEntity() that checks whether the given player playing the given game can see the given entity. Takes into account double-blind, hidden units, team vision, etc. Game Master is excluded.- Parameters:
localPlayer- The player to check.game- The currentGameentity- The entity to check- Returns:
- Whether the player can see the entity.
-
onlyDetectedBySensors
Used to determine if this entity is only detected by an enemies sensors and hence should only be a sensor return. -
trackThisEntitiesVisibilityInfo
We only want to show double-blind visibility indicators on our own meks and teammates meks (assuming team vision option).
-