use of main.content.mode.ModeImpl in project Eidolons by IDemiurge.
the class DC_UnitModel method getBehaviorMode.
public BEHAVIOR_MODE getBehaviorMode() {
MODE mode = getMode();
if (!(mode instanceof ModeImpl) || mode == null) {
return null;
}
ModeImpl modeImpl = (ModeImpl) mode;
return modeImpl.getBehaviorMode();
}
use of main.content.mode.ModeImpl in project Eidolons by IDemiurge.
the class UnitInitializer method initMode.
public void initMode() {
String name = getProperty(G_PROPS.MODE);
MODE mode = (new EnumMaster<STD_MODES>().retrieveEnumConst(STD_MODES.class, name));
if (mode == null) {
BEHAVIOR_MODE behavior = new EnumMaster<BEHAVIOR_MODE>().retrieveEnumConst(BEHAVIOR_MODE.class, name);
if (behavior != null) {
mode = new ModeImpl(behavior);
}
}
if (mode == null) {
mode = (STD_MODES.NORMAL);
}
getEntity().setMode(mode);
LogMaster.log(LogMaster.CORE_DEBUG, getName() + " has mode: " + mode);
}
Aggregations