/// <summary> /// Check if Bot has approximately reached destination /// </summary> public bool HasReachedDestinationApprox(Bot.DistanceType StopMovementCondition) { return(BotLocomotiveComponent.StopMovementCondition == StopMovementCondition && BotLocomotiveComponent.IsWithinDistance(StopMovementCondition, ProximityHelpers.DistanceDirection.VERTICAL) && BotLocomotiveComponent.IsWithinDistance(StopMovementCondition, ProximityHelpers.DistanceDirection.HORIZONTAL) ); }
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 BotDoSeek(BotLocomotive botLocomotiveComponent, Bot.DistanceType stopMovementCondition = Bot.DistanceType.INTERACTION, string name = NODE_NAME) : base(name) { BotLocomotiveComponent = botLocomotiveComponent; StopMovementCondition = stopMovementCondition; _multiFrameFunc = DoSeek; OnStarted.AddListener(DoSeekOnStarted_Listener); }
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]); } } }
/// <summary> /// Check if Bot has reached destination /// </summary> public bool HasReachedDestination(Bot.DistanceType StopMovementCondition) { return(BotLocomotiveComponent.StopMovementCondition == StopMovementCondition && BotLocomotiveComponent.IsWithinDistance(StopMovementCondition)); }