Esempio n. 1
0
 public BotDoPatrol(BotLocomotive botLocomotiveComponent, string targetTag,
                    string name = NODE_NAME) : base(name)
 {
     BotLocomotiveComponent = botLocomotiveComponent;
     _botVisionComponent    = BotLocomotiveComponent.GetComponent <BotPartVision>();
     TargetTag = targetTag;
 }
 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);
 }
        public string        DebugDistanceType;   // = "";

        public BotDebugValues(Bot targetBot,
                              Object waypoint           = null, bool fullspeed   = false,
                              float interactionCooldown = 0f, float currentSpeed = 0,
                              string debugDistanceType  = "")
        {
            TargetBot           = targetBot;
            TargetBotLocomotive = (BotLocomotive)TargetBot;
            Waypoint            = waypoint;
            Fullspeed           = fullspeed;
            InteractionCooldown = interactionCooldown;
            CurrentSpeed        = currentSpeed;
            DebugDistanceType   = debugDistanceType;
        }
 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]);
         }
     }
 }