public void SetBehaviourTreeOverride(BehaviourTree behaviourTree)
 {
     BehaviourTree          = behaviourTree;
     UnitBlackboard         = BehaviourTree.Blackboard as UnitBlackboard;
     BehaviourTree.Executor = this;
     BehaviourTree.Init();
 }
 protected override void Awake()
 {
     base.Awake();
     UnitBlackboard = new UnitBlackboard();
     Unit           = GetComponent <Unit>();
     Unit.OnDeath  += OnBecameDead;
     UnitBlackboard = BehaviourTree.Blackboard as UnitBlackboard;
 }
Exemple #3
0
 public override void Init()
 {
     AIController   = (AIController)BehaviourTree.Executor;
     Unit           = AIController.Unit;
     UnitBlackboard = (UnitBlackboard)BehaviourTree.Blackboard;
 }