Search in sources :

Example 1 with AiGroupData

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;
    }
}
Also used : AiGroupData(main.game.logic.dungeon.editor.logic.AiGroupData)

Example 2 with AiGroupData

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);
}
Also used : ObjAtCoordinate(main.entity.type.ObjAtCoordinate) Obj(main.entity.obj.Obj) AiGroupData(main.game.logic.dungeon.editor.logic.AiGroupData) Coordinates(main.game.bf.Coordinates)

Aggregations

AiGroupData (main.game.logic.dungeon.editor.logic.AiGroupData)2 Obj (main.entity.obj.Obj)1 ObjAtCoordinate (main.entity.type.ObjAtCoordinate)1 Coordinates (main.game.bf.Coordinates)1