use of main.game.logic.dungeon.editor.logic.AiGroupData in project Eidolons by IDemiurge.
the class LE_AiMaster method editAI.
public static void editAI(Obj obj) {
int result = DialogMaster.optionChoice("What to do?", options);
if (result < 0) {
return;
}
AiGroupData group = getAiGroup(obj);
switch(options[result]) {
case "Edit Group":
editGroup(group);
break;
case "Show Group":
showGroup(group);
break;
case "Remove Group":
removeGroup(group);
break;
case "New Group":
newGroup(obj);
break;
}
}
use of main.game.logic.dungeon.editor.logic.AiGroupData in project Eidolons by IDemiurge.
the class LE_AiMaster method newGroup.
private static void newGroup(Obj obj) {
AiGroupData aiGroup = new AiGroupData(obj);
while (true) {
Coordinates c = LevelEditor.getMouseMaster().pickCoordinate();
if (c == null) {
break;
}
// per level!
for (Obj u : LevelEditor.getSimulation().getUnitsForCoordinates(c)) {
ObjAtCoordinate objAtCoordinate = new ObjAtCoordinate(u.getType(), c);
aiGroup.add(objAtCoordinate);
}
}
LevelEditor.getCurrentLevel().getAiGroups().add(aiGroup);
}
Aggregations