use of main.content.mode.STD_MODES 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