Corosus

Untitled

Jan 22nd, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. public void initBTTemplate() {
  2.        
  3.         this.btSenses = new SelectorConcurrent(null);
  4.         this.btSenses.add(new SenseEnvironment(this.btSenses, this.blackboard));
  5.        
  6.         SelectorSequence selTop = new SelectorSequence(null);
  7.        
  8.         this.btAI = selTop;
  9.         selTop.add(new CoroAI.bt.nodes.Hunt(selTop, this.entInt, this.blackboard, 16F));
  10.        
  11.         this.btMovement = new SelectorSequence(null);
  12.         SelectorBoolean selLongPath = new SelectorBoolean(this.btMovement, this.blackboard.isLongPath);
  13.         this.btMovement.add(selLongPath);
  14.        
  15.         SelectorMoveToPathBest sel1_PathBest = new SelectorMoveToPathBest(selLongPath, this.entInt, this.blackboard);
  16.         SelectorBoolean selSafeOrClosePath = new SelectorBoolean(selLongPath, this.blackboard.isSafeOrClosePath);
  17.        
  18.         Delay delay = new Delay(null, 0, 0);
  19.        
  20.         SelectorMoveToPathClose sel_PathClosePartial = new SelectorMoveToPathClose(null, this.entInt, this.blackboard, 1, true);
  21.         SelectorMoveToPathClose sel_PathCloseExact = new SelectorMoveToPathClose(null, this.entInt, this.blackboard, 1, false);
  22.         SelectorMoveToPosVec sel_MoveToPos = new SelectorMoveToPosVec(selSafeOrClosePath, this.entInt, this.blackboard, 1.5F);
  23.        
  24.         selLongPath.add(selSafeOrClosePath);
  25.         selLongPath.add(sel1_PathBest);
  26.        
  27.         sel1_PathBest.add(sel_PathCloseExact); //change to partial once its coded
  28.         sel1_PathBest.add(delay);
  29.         selSafeOrClosePath.add(sel_PathCloseExact);
  30.         selSafeOrClosePath.add(sel_MoveToPos);
  31.        
  32.         sel_MoveToPos.add(delay);
  33.         sel_MoveToPos.add(delay);
  34.        
  35.         this.btInventory = new SelectorSequence(null);
  36.         this.btInventory.add(new AttackMelee(btInventory, entInt, blackboard, 3F, 10));
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment