use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.
the class Ecgberht method initAddonBuildTree.
private static void initAddonBuildTree() {
BuildAddon bA = new BuildAddon("Build Addon", gs);
CheckResourcesAddon cRA = new CheckResourcesAddon("Check Resources Addon", gs);
ChooseComsatStation cCS = new ChooseComsatStation("Choose Comsat Station", gs);
ChooseMachineShop cMS = new ChooseMachineShop("Choose Machine Shop", gs);
ChooseTower cT = new ChooseTower("Choose Control Tower", gs);
Selector ChooseAddon = new Selector("Choose Addon");
if (gs.getStrat().buildAddons.contains(UnitType.Terran_Machine_Shop))
ChooseAddon.addChild(cMS);
if (gs.getStrat().buildAddons.contains(UnitType.Terran_Comsat_Station))
ChooseAddon.addChild(cCS);
if (gs.getStrat().buildAddons.contains(UnitType.Terran_Control_Tower))
ChooseAddon.addChild(cT);
Sequence Addon = new Sequence("Addon", ChooseAddon, cRA, bA);
addonBuildTree = new BehavioralTree("Addon Build Tree");
addonBuildTree.addChild(Addon);
}
use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.
the class Ecgberht method initRepairTree.
private void initRepairTree() {
CheckBuildingFlames cBF = new CheckBuildingFlames("Check building in flames", gs);
ChooseRepairer cR = new ChooseRepairer("Choose Repairer", gs);
Repair R = new Repair("Repair Building", gs);
Sequence Repair = new Sequence("Repair", cBF, cR, R);
repairTree = new BehavioralTree("RepairTree");
repairTree.addChild(Repair);
}
Aggregations