Created
January 22, 2014 12:24
-
-
Save Corosauce/8557853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void initBTTemplate() { | |
this.btSenses = new SelectorConcurrent(null); | |
this.btSenses.add(new SenseEnvironment(this.btSenses, this.blackboard)); | |
SelectorSequence selTop = new SelectorSequence(null); | |
this.btAI = selTop; | |
selTop.add(new CoroAI.bt.nodes.Hunt(selTop, this.entInt, this.blackboard, 16F)); | |
this.btMovement = new SelectorSequence(null); | |
SelectorBoolean selLongPath = new SelectorBoolean(this.btMovement, this.blackboard.isLongPath); | |
this.btMovement.add(selLongPath); | |
SelectorMoveToPathBest sel1_PathBest = new SelectorMoveToPathBest(selLongPath, this.entInt, this.blackboard); | |
SelectorBoolean selSafeOrClosePath = new SelectorBoolean(selLongPath, this.blackboard.isSafeOrClosePath); | |
Delay delay = new Delay(null, 0, 0); | |
SelectorMoveToPathClose sel_PathClosePartial = new SelectorMoveToPathClose(null, this.entInt, this.blackboard, 1, true); | |
SelectorMoveToPathClose sel_PathCloseExact = new SelectorMoveToPathClose(null, this.entInt, this.blackboard, 1, false); | |
SelectorMoveToPosVec sel_MoveToPos = new SelectorMoveToPosVec(selSafeOrClosePath, this.entInt, this.blackboard, 1.5F); | |
selLongPath.add(selSafeOrClosePath); | |
selLongPath.add(sel1_PathBest); | |
sel1_PathBest.add(sel_PathCloseExact); //change to partial once its coded | |
sel1_PathBest.add(delay); | |
selSafeOrClosePath.add(sel_PathCloseExact); | |
selSafeOrClosePath.add(sel_MoveToPos); | |
sel_MoveToPos.add(delay); | |
sel_MoveToPos.add(delay); | |
this.btInventory = new SelectorSequence(null); | |
this.btInventory.add(new AttackMelee(btInventory, entInt, blackboard, 3F, 10)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment