public BotDoPatrol(BotLocomotive botLocomotiveComponent, string targetTag, string name = NODE_NAME) : base(name) { BotLocomotiveComponent = botLocomotiveComponent; _botVisionComponent = BotLocomotiveComponent.GetComponent <BotPartVision>(); TargetTag = targetTag; }
protected void InitComponents() { _botGroundComponent = GetComponent <BotGround>(); _behaviourManagerComponent = GetComponent <BehaviourManager>(); _botVisionComponent = GetComponent <BotPartVision>(); FlagHolder = gameObject.GetChild(NAME_FLAGHOLDER); }
public BotSeekWithinSightSequence(BotLocomotive botLocomotiveComponent, BotPartVision botVisionComponent, string targetTag, Bot.DistanceType stopMovementCondition = Bot.DistanceType.INTERACTION) : base(false) { // StopMovementConditions stopMovementCondition = StopMovementConditions.WITHIN_INTERACTION_DISTANCE) : base(false){ Init(botLocomotiveComponent, botVisionComponent, stopMovementCondition, targetTag); }
public BotIsWithinSight(BotPartVision botVisionComponent, string targetTag, BehaviourNode decoratee, bool inverseCondition = false, string nodeName = NODE_NAME, AbortRule abortRule = AbortRule.NONE) : base(decoratee, nodeName, abortRule) { _botVisionComponent = botVisionComponent; TargetTag = targetTag; _inverseCondition = inverseCondition; Init(IsWithinSight); }
private void Init(BotLocomotive botLocomotiveComponent, BotPartVision botVisionComponent, Bot.DistanceType stopMovementCondition, string targetTag, BehaviourNode[] nodes = null) { // StopMovementConditions stopMovementCondition , string targetTag, BehaviourNode[] nodes = null){ DoSeek = new BotDoSeek(botLocomotiveComponent, stopMovementCondition); IsWithinSight = new BotIsWithinSight(botVisionComponent, targetTag, DoSeek); AddChild(IsWithinSight); if (nodes != null) { for (int i = 0; i < nodes.Length; i++) { AddChild(nodes[i]); } } }