public override void StartTree(BTFiniteStateMachine sm) { base.StartTree(sm); Blackboard.Add("DestinationSetter", GetComponent <Pathfinding.AIDestinationSetter>()); Blackboard.Add("Transform", transform); Blackboard.Add("DestinationSetter", GetComponent <Pathfinding.AIDestinationSetter>()); Blackboard.Add("Transform", transform); Blackboard.Add("NecroInput", FindObjectOfType <NecromancerInput>()); target = MinionManager.manager.GetTarget(); mRoot = new BTRepeator (this, new BTStepSequencer (this, new BTNode[] { new BTParallel (this, new BTNode[] { new BTMoveToTarget(this, target), new BTAnimateMovement(this) } ), new BTParallel (this, new BTNode[] { new BTLookAtAim(this), new BTAnimateMovement(this) } ) } ) ); }
public override void StartTree(BTFiniteStateMachine sm) { base.StartTree(sm); Blackboard.Add("DestinationSetter", GetComponent <Pathfinding.AIDestinationSetter>()); Blackboard.Add("Transform", transform); Blackboard.Add("WaitTime", 5f); Blackboard.Add("SearhLayer", GetComponent <Searcher>()); mRoot = new BTRepeator (this, new BTParallel (this, new BTNode[] { new BTStepSequencer (this, new BTNode[] { new BTParallel (this, new BTNode[] { new BTMoveToRandomRoomPoint(this), new BTAnimateMovement(this) } ), new BTIdleForTime(this) } ), new BTLookForTargets(this) }) ); }
public override void StartTree(BTFiniteStateMachine sm) { base.StartTree(sm); Transform followPoint = MinionManager.manager.GetPlayerSubMoveGuide(transform.GetComponent <MinionController>().minionIndex); Blackboard.Add("FollowTransform", followPoint != null ? followPoint : MinionManager.manager.GetPlayerCoreMoveGuide()); Blackboard.Add("DestinationSetter", GetComponent <Pathfinding.AIDestinationSetter>()); Blackboard.Add("Transform", transform); Blackboard.Add("NecroInput", FindObjectOfType <NecromancerInput>()); mRoot = new BTRepeator (this, new BTStepSequencer (this, new BTNode[] { new BTParallel (this, new BTNode[] { new BTMoveToPlayer(this), new BTAnimateMovement(this) } ), new BTParallel (this, new BTNode[] { new BTLookAtAim(this), new BTAnimateMovement(this) } ) } ) ); }