use of eidolons.entity.obj.unit.DC_UnitModel in project Eidolons by IDemiurge.
the class StructureResetter method resetFacing.
public void resetFacing() {
FACING_DIRECTION facing = null;
if (facing != null) {
setProperty(PROPS.FACING_DIRECTION, facing.getName());
} else {
String name = getProperty(PROPS.FACING_DIRECTION);
facing = (new EnumMaster<FACING_DIRECTION>().retrieveEnumConst(FACING_DIRECTION.class, name));
if (facing == null) {
if (getEntity().getDirection() != null) {
FacingMaster.getFacingFromDirection(getEntity().getDirection());
} else if (getRef().getObj(KEYS.SUMMONER) != null) {
facing = ((DC_UnitModel) getRef().getObj(KEYS.SUMMONER)).getFacing();
} else {
facing = FacingMaster.getRandomFacing();
}
}
}
getEntity().setFacing(facing);
// getEntity().setFacing(facing);
}
use of eidolons.entity.obj.unit.DC_UnitModel in project Eidolons by IDemiurge.
the class UnitResetter method resetFacing.
public void resetFacing() {
FACING_DIRECTION facing = null;
if (facing != null) {
setProperty(PROPS.FACING_DIRECTION, facing.getName());
} else {
String name = getProperty(PROPS.FACING_DIRECTION);
facing = (new EnumMaster<FACING_DIRECTION>().retrieveEnumConst(FACING_DIRECTION.class, name));
if (facing == null) {
if (getEntity().getDirection() != null) {
FacingMaster.getFacingFromDirection(getEntity().getDirection());
} else if (getRef().getObj(KEYS.SUMMONER) != null) {
facing = ((DC_UnitModel) getRef().getObj(KEYS.SUMMONER)).getFacing();
} else {
facing = FacingMaster.getRandomFacing();
}
}
}
getEntity().setFacing(facing);
}
Aggregations