Search in sources :

Example 1 with GuardAi

use of eidolons.game.module.dungeoncrawl.ai.GuardAi in project Eidolons by IDemiurge.

the class BehaviorMaster method getBehavior.

private AiBehavior getBehavior(UnitAI ai, AI_BEHAVIOR_MODE type) {
    AiBehavior behavior = behaviorMap.get(type);
    if (behavior != null) {
        return behavior;
    }
    switch(type) {
        case WANDER:
            behavior = new WanderAi();
            break;
        case AMBUSH:
            break;
        case AGGRO:
            break;
        case STALK:
            break;
        case PATROL:
            break;
        case GUARD:
            behavior = new GuardAi();
            break;
    }
    behaviorMap.put(type, behavior);
    // preCheck unit is viable?
    return behavior;
}
Also used : GuardAi(eidolons.game.module.dungeoncrawl.ai.GuardAi) AiBehavior(eidolons.game.module.dungeoncrawl.ai.AiBehavior) WanderAi(eidolons.game.module.dungeoncrawl.ai.WanderAi)

Aggregations

AiBehavior (eidolons.game.module.dungeoncrawl.ai.AiBehavior)1 GuardAi (eidolons.game.module.dungeoncrawl.ai.GuardAi)1 WanderAi (eidolons.game.module.dungeoncrawl.ai.WanderAi)1