use of main.content.enums.rules.VisionEnums.UNIT_VISION in project Eidolons by IDemiurge.
the class MiniObjComp method applyVisibility.
private void applyVisibility() {
// TODO inter-dependence of the four...?
PLAYER_VISION detection = obj.getActivePlayerVisionStatus();
UNIT_VISION vision = obj.getUnitVisionStatus();
VISIBILITY_LEVEL visibility = obj.getVisibilityLevel();
// PERCEPTION_STATUS perception = obj.getPerceptionStatus();
// ++ TARGETING HL
// draw image / info icons
boolean hidden = false;
if (detection == PLAYER_VISION.UNKNOWN) {
image = (ImageManager.getHiddenCellIcon()).getImage();
obj.setImage("UI//cells//Hidden Cell v" + 1 + ".png");
return;
}
// ImageManager.getOutlineImage(obj);
// ImageTransformer.getTransparent(image, trasparency);
// // ImageManager.STD_IMAGES.DEEPER_DARKNESS
// PerceptionRule.getHints(obj, perception, visibility);
// TO BE USED WHEN UNIT ACTS -
// "something huge/monstrous/humanoid/mechanical/ghostly/demonic..." etc
// if (vision == UNIT_TO_UNIT_VISION.IN_SIGHT) -> negate other effects?
// which status has priority? -> VISIBILITY!
/*
* perception:
*
*
*
*/
boolean terrain = (obj instanceof DC_Cell);
if (vision != UNIT_VISION.IN_PLAIN_SIGHT) {
if (detection == PLAYER_VISION.DETECTED) {
image = !terrain ? ImageManager.applyBorder(image, ImageManager.BORDER_BEYOND_SIGHT) : (ImageManager.getHiddenCellIcon()).getImage();
} else {
image = !terrain ? ImageManager.applyBorder(image, ImageManager.BORDER_UNKNOWN) : (ImageManager.getUnknownCellIcon()).getImage();
}
} else {
// if (visibility == VISIBILITY_LEVEL.DEEPER_DARKNESS) {
//
// }
}
}
Aggregations